target-text-007.html (829B)
1 <!DOCTYPE html> 2 <meta charset="utf-8" /> 3 <title>CSS Pseudo-Elements Test: ::target-text text color with transparent originating color</title> 4 <link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com"> 5 <link rel="help" href="https://drafts.csswg.org/css-pseudo/#selectordef-target-text"> 6 <link rel="help" href="https://crbug.com/1273943"> 7 <meta name="assert" content="This test checks that ::target-text pseudo-element uses the specified color even when the originating element text color was trasnparent."> 8 <link rel="match" href="/css/reference/pass_if_pass_below.html"> 9 <style> 10 div { 11 color: transparent; 12 } 13 ::target-text { 14 color: black; 15 } 16 </style> 17 18 <p>Test passes if there is the word "PASS" below.</p> 19 <div>PASS </div> 20 21 <script> 22 window.location.hash = "#:~:text=PASS%20"; 23 </script>