caret-color-004

caret-color auto, black on white

WeasyPrint

This browser

Flags
interact
Assertion
Test checks that caret-color:auto provides good contrast in black on white

Source

 1 <!DOCTYPE html>
 2 <html><head><meta charset="utf-8">
 3 <title>CSS Basic User Interface Test: caret-color auto, black on white</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 <meta content="interact" name="flags">
 7 <meta content="Test checks that caret-color:auto provides good contrast in black on white" name="assert">
 8 <style>
 9   textarea {
10     font-size: 3em;
11     font-weight: bold;
12     width: 10em;
13     padding: 10px;
14 
15     background: white;
16     color: black;
17     caret-color: auto; /*initial value, but to be sure in case the UA stylesheet sets something else */
18   }
19 </style>
20 </head><body>
21   <p>Test passes if, when the text area below is focused for editing, the text insertion caret is either black
22   or some other color that contrasts well with the background.</p>
23   <p>The shape of the caret, and whether it flashes, are not part of the test.</p>
24   <textarea id="test"></textarea>
25   <script>
26     window.onload = function() {
27       document.getElementById("test").focus();
28     }
29   </script>
30 
31 </body></html>