Skip to content

Commit 0755ed2

Browse files
committed
[css-ui-4] Simplify animation code in examples
1 parent 9327df0 commit 0755ed2

File tree

1 file changed

+13
-14
lines changed

1 file changed

+13
-14
lines changed

css-ui-4/Overview.bs

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -184,15 +184,14 @@ textarea {
184184
animation: caret-alternate 2s step-end infinite;
185185
}
186186
@keyframes caret-alternate {
187-
from { caret-color: blue; }
188187
50% { caret-color: red; }
189188
}
190189
</code></pre>
191190

192191
The simulated rendering below illustrates how this would look.
193192
<style>
194-
@-webkit-keyframes caret-alternate { from { border-color: blue; } 50% { border-color: red; } }
195-
@keyframes caret-alternate { from { border-color: blue; } 50% { border-color: red; } }
193+
@-webkit-keyframes caret-alternate { 50% { border-color: red; } }
194+
@keyframes caret-alternate { 50% { border-color: red; } }
196195
</style>
197196
<div style="border:inset; background: white; width: 10em;">
198197
Text area
@@ -277,12 +276,12 @@ The stacking position of the caret is left undefined, within the following const
277276
the insertion point is between the letters u and m.
278277

279278
<style>
280-
@-webkit-keyframes caret-bar { from { outline-color: black; } 50% { outline-color: transparent; } }
281-
@-webkit-keyframes caret-block { from { background: #bbb; } 50% { background: transparent; } }
282-
@-webkit-keyframes caret-underscore { from { border-color: black; } 50% { border-color: transparent; } }
283-
@keyframes caret-bar { from { outline-color: black; } 50% { outline-color: transparent; } }
284-
@keyframes caret-block { from { background: #bbb; } 50% { background: transparent; } }
285-
@keyframes caret-underscore { from { border-color: black; } 50% { border-color: transparent; } }
279+
@-webkit-keyframes caret-bar { 50% { outline-color: transparent; } }
280+
@-webkit-keyframes caret-block { 50% { background: transparent; } }
281+
@-webkit-keyframes caret-underscore { 50% { border-color: transparent; } }
282+
@keyframes caret-bar { 50% { outline-color: transparent; } }
283+
@keyframes caret-block { 50% { background: transparent; } }
284+
@keyframes caret-underscore { 50% { border-color: transparent; } }
286285
#caret-shape-example {
287286
min-width: 25em;
288287
}
@@ -297,9 +296,9 @@ The stacking position of the caret is left undefined, within the following const
297296
</style>
298297
<table id="caret-shape-example">
299298
<tr><th>'caret-shape'<th>Sample rendering
300-
<tr><td>''bar''<td>Lorem ipsu<span style="outline: 1px solid;animation: caret-bar 2s step-end infinite;-webkit-animation: caret-bar 2s step-end infinite;">&#8203;</span>m
301-
<tr><td>''block''<td>Lorem ipsu<span style="-webkit-animation: caret-block 2s step-end infinite;animation: caret-block 2s step-end infinite;">m</span>
302-
<tr><td>''underscore''<td>Lorem ispu<span style="border-bottom: 2px solid; -webkit-animation: caret-underscore 2s step-end infinite; animation: caret-underscore 2s step-end infinite;">m</span>
299+
<tr><td>''bar''<td>Lorem ipsu<span style="outline: 1px solid black;animation: caret-bar 2s step-end infinite;-webkit-animation: caret-bar 2s step-end infinite;">&#8203;</span>m
300+
<tr><td>''block''<td>Lorem ipsu<span style="background: #bbb; -webkit-animation: caret-block 2s step-end infinite;animation: caret-block 2s step-end infinite;">m</span>
301+
<tr><td>''underscore''<td>Lorem ispu<span style="border-bottom: 2px solid black; -webkit-animation: caret-underscore 2s step-end infinite; animation: caret-underscore 2s step-end infinite;">m</span>
303302
</table>
304303
</div>
305304

@@ -319,8 +318,8 @@ The stacking position of the caret is left undefined, within the following const
319318
</code></pre>
320319

321320
<style>
322-
@-webkit-keyframes terminal-caret { from { border-color: white; } 50% { border-color: transparent; } }
323-
@keyframes terminal-caret { from { border-color: white; } 50% { border-color: transparent; } }
321+
@-webkit-keyframes terminal-caret { 50% { border-color: transparent; } }
322+
@keyframes terminal-caret { 50% { border-color: transparent; } }
324323
</style>
325324
<pre style="background: black; color: white; font-family: monospace; padding: 1ex">
326325
user@host:css-ui-4 $ ls -a

0 commit comments

Comments
 (0)