highlight-cascade-008-ref.html (597B)
1 <!DOCTYPE html> 2 <title>Custom property values from the root element</title> 3 <script src="../support/selections.js"></script> 4 <style> 5 div::selection { 6 background-color: green; 7 text-decoration-line: underline; 8 text-decoration-style: line; 9 text-decoration-thickness: 1px; 10 text-decoration-color: yellow; 11 } 12 span::selection { 13 background-color: blue; 14 } 15 </style> 16 <div style="width: 300px">PASS if background-color is green when selected, <span>except this which is blue</span>, and underline is yellow.<script> 17 selectNodeContents(document.querySelector("div")); 18 </script>