highlight-paired-cascade-001.html (1196B)
1 <!doctype html> 2 <meta charset="utf-8"> 3 <title>CSS Pseudo-Elements Test: paired cascade: UA default highlight colors are not used when highlight pseudo cascade yields foreground color</title> 4 <link rel="author" name="Delan Azabani" href="mailto:dazabani@igalia.com"> 5 <link rel="help" href="https://drafts.csswg.org/css-pseudo-4/#highlight-cascade"> 6 <link rel="match" href="highlight-paired-cascade-001-ref.html"> 7 <meta name="assert" value="This test verifies that setting color on ::selection suppresses any UA non-initial used value for background-color. These properties are highlight colors, which are subject to paired cascade."> 8 <script src="support/selections.js"></script> 9 <link rel="stylesheet" href="../support/highlights.css"> 10 <style> 11 main { 12 font-size: 7em; 13 margin: 0.5em; 14 } 15 main::selection { 16 /* 17 Used background-color should be initial (transparent). 18 https://www.w3.org/TR/CSS21/colors.html#propdef-background-color 19 */ 20 color: transparent; 21 } 22 </style> 23 <p>Test passes if no text is legible below. 24 <main class="highlight_reftest">FAIL</main> 25 <script>selectNodeContents(document.querySelector("main"));</script>