caret-color-007

caret-color: currentColor

WeasyPrint

This browser

Flags
interact
Assertion
Test checks that caret-color:currentColor is inherited as currentColor and resolves to the value of the color property at used value time

Source

 1 <!DOCTYPE html>
 2 <html><head><meta charset="utf-8">
 3 <title>CSS Basic User Interface Test: caret-color: currentColor</title>
 4 <link href="mailto:chris@w3.org" rel="author" title="Chris Lilley">
 5 <link href="mailto:florian@rivoal.net" rel="author" title="Florian Rivoal">
 6 <link href="http://www.w3.org/TR/css3-ui/#caret-color" rel="help">
 7 <link href="https://drafts.csswg.org/css-color-4/#currentcolor-color" rel="help">
 8 <meta content="interact" name="flags">
 9 <meta content="Test checks that caret-color:currentColor is inherited as currentColor and resolves to the value of the color property at used value time" name="assert">
10 <style>
11   textarea {
12     font-size: 3em;
13     font-weight: bold;
14     width: 10em;
15     padding: 10px;
16     background: black; /* the color of a thin object like the caret is easier to see on a black background. */
17 
18     color: lime;
19   }
20   div {
21     caret-color: currentcolor;
22     color: red;
23   }
24 </style>
25 </head><body>
26   <p>Test passes if, when the text area below is focused for editing, the text insertion caret is green</p>
27   <p>The shape of the caret, and whether it flashes, are not part of the test.</p>
28   <div>
29     <textarea id="test"></textarea>
30   </div>
31   <script>
32     window.onload = function() {
33       document.getElementById("test").focus();
34     }
35   </script>
36 
37 </body></html>