Skip to content

Commit 2a8e4f8

Browse files
committed
[css-paint-api] Adds additional text in example 1 about animations.
Fixes w3c#196. We don't need any normative text here (as it is already covered by the rest of css), but adding as some example text.
1 parent 94db662 commit 2a8e4f8

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

css-paint-api/Overview.bs

+14-6
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ Ignored Terms: PaintWorklet
3434

3535
<pre class="link-defaults">
3636
spec:css-break-3; type:dfn; text:fragment
37+
spec:css-display-3; type:dfn; text:box
3738
spec:infra; type:dfn; text:list
3839
</pre>
3940

@@ -634,8 +635,15 @@ Note: The contents of the resulting image are not designed to be accessible. Aut
634635
Examples {#examples}
635636
====================
636637

637-
Example 1: A colored circle. {#example-1}
638-
-----------------------------------------
638+
Example 1: Colored Circle {#example-1}
639+
--------------------------------------
640+
641+
The example below makes use of the fact that <<paint()>> functions are able to be animated. E.g.
642+
when the textarea is focused in the example below, the <code>--circle-color</code> property will
643+
transition from <code>deepskyblue</code> to <code>purple</code>.
644+
645+
This ability isn't limited to just transitions, it also applies to CSS animations, and the Web
646+
Animations API.
639647

640648
<pre class='lang-markup'>
641649
&lt;!DOCTYPE html>
@@ -691,8 +699,8 @@ registerPaint('circle', class {
691699
});
692700
</pre>
693701

694-
Example 2: Image placeholder. {#example-2}
695-
------------------------------------------
702+
Example 2: Image Placeholder {#example-2}
703+
-----------------------------------------
696704

697705
It is possible for an author to use paint to draw a placeholder image while an image is being
698706
loaded.
@@ -828,8 +836,8 @@ registerPaint('arc', class {
828836
});
829837
</pre>
830838

831-
Example 4: Different color based on size {#example-4}
832-
-----------------------------------------------------
839+
Example 4: Different Colors (based on size) {#example-4}
840+
--------------------------------------------------------
833841

834842
<pre class='lang-markup'>
835843
&lt;h1>

0 commit comments

Comments
 (0)