tor-browser

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

host-specificity.html (805B)


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