tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

highlight-paired-cascade-004.html (1268B)


      1 <!doctype html>
      2 <meta charset="utf-8">
      3 <title>CSS Pseudo-Elements Test: paired cascade: rule includes highlight pseudos other than ::selection</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="mismatch" href="highlight-paired-cascade-004-notref.html">
      7 <meta name="assert" value="This test verifies that setting color on ::target-text suppresses any UA non-initial used value for background-color. ::target-text is a highlight pseudo with a recommended UA default background-color that is not initial (Mark), so paired cascade can be observed.">
      8 <link rel="stylesheet" href="../support/highlights.css">
      9 <style>
     10    :link, :visited {
     11        color: blue;
     12    }
     13    main {
     14        font-size: 7em;
     15        margin: 0.5em;
     16    }
     17    main::target-text {
     18        /*
     19            Used background-color should be initial (transparent).
     20            https://www.w3.org/TR/CSS21/colors.html#propdef-background-color
     21        */
     22        color: black;
     23    }
     24 </style>
     25 <p>Test passes if the text below does not appear to be highlighted (<a href="">test again</a>).
     26 <main class="highlight_reftest">quick</main>
     27 <script>location.href = "#:~:text=quick";</script>