tor-browser

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

highlight-cascade-001.html (1239B)


      1 <!doctype html>
      2 <meta charset="utf-8">
      3 <title>CSS Pseudo-Elements Test: highlight cascade: unset is treated like inherit regardless of whether property is inherited</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-cascade">
      6 <link rel="match" href="highlight-cascade-001-ref.html">
      7 <meta name="assert" value="This test verifies that, given ::selection styles with both color and background-color declared as unset, both properties inherit their values from the parent ::selection styles. All properties become inherited for the purposes of deciding whether unset should mean initial or inherit.">
      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        background-color: green;
     17        color: white;
     18    }
     19    main > span::selection {
     20        background-color: unset;
     21        color: unset;
     22    }
     23 </style>
     24 <p>Test passes if the text below is white on green.
     25 <main class="highlight_reftest"><span>quick</span></main>
     26 <script>selectNodeContents(document.querySelector("main"));</script>