tor-browser

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

highlight-styling-004.html (981B)


      1 <!doctype html>
      2 <meta charset="utf-8">
      3 <title>CSS Pseudo-Elements Test: the light-dark() function in highlight pseudos</title>
      4 <link rel="author" title="Stephen Chenney" href="mailto:schenney@chromium.org">
      5 <link rel="help" href="https://drafts.csswg.org/css-pseudo-4/#highlight-styling">
      6 <link rel="match" href="highlight-styling-004-ref.html">
      7 <meta name="assert" value="This test verifies that ::selection styles make use of the light-dark() function.">
      8 <script src="support/selections.js"></script>
      9 <link rel="stylesheet" href="support/highlights.css">
     10 <style>
     11  :root {
     12    color-scheme: light dark;
     13  }
     14 
     15  .light {
     16    color-scheme: light;
     17  }
     18 
     19  .dark {
     20    color-scheme: dark;
     21  }
     22 
     23  p::selection {
     24    color: light-dark(green, blue);
     25  }
     26 </style>
     27 <p>Test passes if Light is green and Dark is blue.</p>
     28 <main class="highlight_reftest">
     29    <p class="light">Light</p>
     30    <p class="dark">Dark</p>
     31 </main>
     32 <script>selectNodeContents(document.querySelector("main"));</script>