tor-browser

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

highlight-styling-002.html (993B)


      1 <!doctype html>
      2 <meta charset="utf-8">
      3 <title>CSS Pseudo-Elements Test: highlight styling: originating custom property values are used for highlight pseudos</title>
      4 <link rel="author" title="Delan Azabani" href="mailto:dazabani@igalia.com">
      5 <link rel="help" href="https://drafts.csswg.org/css-pseudo-4/#highlight-styling">
      6 <link rel="match" href="highlight-styling-002-ref.html">
      7 <meta name="assert" value="This test verifies that custom property values on the originating element are used for resolving var() in a selection pseudo.">
      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        --x: green;
     15    }
     16    main::selection {
     17        color: white;
     18        background-color: var(--x, red);
     19    }
     20 </style>
     21 <p>Test passes if the text below is white on green.
     22 <main class="highlight_reftest">quick</main>
     23 <script>selectNodeContents(document.querySelector("main"));</script>