caret-color-017

caret-color transition

WeasyPrint

This browser

Flags
interact
Assertion
Test checks that caret-color can be used in a transition

Source

 1 <!DOCTYPE html>
 2 <html><head><meta charset="utf-8">
 3 <title>CSS Basic User Interface Test: caret-color transition</title>
 4 <link href="mailto:rego@igalia.com" rel="author" title="Manuel Rego Casasnovas">
 5 <link href="http://www.w3.org/TR/css3-ui/#caret-color" rel="help">
 6 <link href="https://www.w3.org/TR/css3-transitions/#transition" rel="help">
 7 <meta content="interact" name="flags">
 8 <meta content="Test checks that caret-color can be used in a transition" 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: magenta;
18     transition: caret-color 5s;
19   }
20 
21   textarea:focus {
22     caret-color: lime;
23   }
24 </style>
25 </head><body>
26   <p>Test passes if, when the text area below is focused for editing, the text insertion caret color gradually changes from magenta to green.</p>
27   <p>The shape of the caret, and whether it flashes, are not part of the test.</p>
28   <textarea></textarea>
29 
30 </body></html>