tor-browser

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

host-specificity-003.html (857B)


      1 <!doctype html>
      2 <meta charset="utf-8">
      3 <title>CSS Test: the :host() selector affects specificity</title>
      4 <link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
      5 <link rel="author" title="Mozilla" href="https://mozilla.org">
      6 <link rel="help" href="https://drafts.csswg.org/css-scoping/#host-selector">
      7 <link rel="help" href="https://github.com/w3c/csswg-drafts/issues/1915">
      8 <link rel="help" href="https://bugzil.la/1454165">
      9 <link rel="match" href="reference/green-box.html">
     10 <p>Test passes if you see a single 100px by 100px green box below.</p>
     11 <div id="host"></div>
     12 <script>
     13  host.attachShadow({ mode: 'open' }).innerHTML = `
     14    <style>
     15      :host(*) div {
     16        width: 100px;
     17        height: 100px;
     18        background: green;
     19      }
     20      div {
     21        background: red;
     22      }
     23    </style>
     24    <div></div>
     25  `;
     26 </script>