caret-color-008

caret-color animation

WeasyPrint

This browser

Flags
animated, interact
Assertion
Test checks that caret-color is animatable as a color

Source

 1 <!DOCTYPE html>
 2 <html><head><meta charset="utf-8">
 3 <title>CSS Basic User Interface Test: caret-color animation</title>
 4 <link href="mailto:florian@rivoal.net" rel="author" title="Florian Rivoal">
 5 <link href="http://www.w3.org/TR/css3-ui/#caret-color" rel="help">
 6 <link href="https://drafts.csswg.org/css-animations-1/#animation" rel="help">
 7 <meta content="interact animated" name="flags">
 8 <meta content="Test checks that caret-color is animatable as a color" name="assert">
 9 <style>
10   textarea {
11     font-size: 3em;
12     font-weight: bold;
13     width: 10em;
14     padding: 10px;
15     background: black; color: white; /* the color of a thin object like the caret is easier to see on a black background. */
16 
17     caret-color: red;
18     animation: caret-many-colors 5s linear alternate infinite;
19   }
20   @keyframes caret-many-colors {
21 	0% { caret-color: lime; }
22 	20% { caret-color: gray; }
23 	40% { caret-color: cyan; }
24 	60% { caret-color: pink; }
25 	80% { caret-color: blue; }
26 	100% { caret-color: brown; }
27   }
28 </style>
29 </head><body>
30   <p>Test passes if, when the text area below is focused for editing, the text insertion caret continuously changes colors.</p>
31   <p>The shape of the caret, and whether it flashes, are not part of the test.</p>
32   <textarea id="test"></textarea>
33   <script>
34     window.onload = function() {
35       document.getElementById("test").focus();
36     }
37   </script>
38 
39 </body></html>