caret-color-006

caret-color auto, gray on gray

WeasyPrint

This browser

Flags
interact, may
Assertion
Test checks that caret-color:auto provides good contrast in gray on gray

Source

 1 <!DOCTYPE html>
 2 <html><head><meta charset="utf-8">
 3 <title>CSS Basic User Interface Test: caret-color auto, gray on gray</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 may" name="flags">
 7 <meta content="Test checks that caret-color:auto provides good contrast in gray on gray" name="assert">
 8 <style>
 9   textarea {
10     font-size: 3em;
11     font-weight: bold;
12     width: 10em;
13     padding: 10px;
14 
15     background: gray;
16     color: gray;
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
22   any 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>