tor-browser

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

shadow-directionality-002.tentative.html (809B)


      1 <!doctype html>
      2 <title>CSS Test: directionality propagation in Shadow DOM, appending a shadow host.</title>
      3 <link rel="author" href="mailto:emilio@crisal.io" title="Emilio Cobos Álvarez">
      4 <link rel="help" href="https://html.spec.whatwg.org/#the-dir-attribute">
      5 <link rel="help" href="https://github.com/whatwg/html/issues/3699">
      6 <link rel="match" href="reference/green-box.html">
      7 <p>Test passes if you see a single 100px by 100px green box below.</p>
      8 <style>
      9  div { width: 100px; }
     10 </style>
     11 <div id="host-parent" dir="rtl"></div>
     12 <script>
     13  let host = document.createElement("div");
     14  host.attachShadow({ mode: "open" }).innerHTML = `
     15    <style>:dir(rtl) { background: green; height: 100px; width: 100px; }</style>
     16    <div></div>
     17  `;
     18  document.getElementById("host-parent").appendChild(host);
     19 </script>