tor-browser

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

highlight-cascade-005.html (1346B)


      1 <!doctype html>
      2 <meta charset="utf-8">
      3 <title>CSS Pseudo-Elements Test: highlight cascade: inheritance with both universal and non-universal rules</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-005-ref.html">
      7 <meta name="assert" content="This test verifies that, given both universal and non-universal ::selection rules, the subject of the non-universal rule has styles from both rules with the non-universal styles overriding the universal styles (due to the cascade), its descendants have styles from both rules with the universal styles overriding the non-universal styles (due to highlight inheritance), and its siblings have the universal styles only.">
      8 <script src="support/selections.js"></script>
      9 <link rel="stylesheet" href="../support/highlights.css">
     10 <style>
     11    /* * (universal) */::selection {
     12        background-color: green;
     13        color: white;
     14    }
     15    main::selection,
     16    aside ::selection {
     17        color: yellow;
     18    }
     19 </style>
     20 <nav class="highlight_reftest">white</nav>
     21 <main class="highlight_reftest">yellow <span>white <b>white</b></span></main>
     22 <aside class="highlight_reftest">white <i>yellow</i></aside>
     23 <script>selectNodeContents(document.body);</script>