tor-browser

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

dynamic-generated-content-inherit-001.html (962B)


      1 <!doctype html>
      2 <meta charset="utf-8">
      3 <title>CSS Test: Dynamic ::before and ::after generation by a style attribute</title>
      4 <link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
      5 <link rel="match" href="generated-content-inherit-001-ref.html">
      6 <link rel="help" href="https://drafts.csswg.org/css-pseudo/#generated-content">
      7 <meta name="flags" content="">
      8 <meta name="assert" content="Tests that changes to the style attribute of an element properly generate generated content">
      9 <!--
     10  TODO(emilio): upstream this to WPT once
     11  https://github.com/w3c/csswg-drafts/issues/1757 is resolved
     12 -->
     13 <style>
     14 .first::before, .second::after {
     15  content: inherit;
     16 }
     17 </style>
     18 <p>Test passes if you see two PASS lines below:</p>
     19 <div class="first">SS</div>
     20 <div class="second">PA</div>
     21 <script>
     22 document.body.offsetTop;
     23 document.querySelector(".first").style.content = "\"PA\"";
     24 document.querySelector(".second").style.content = "\"SS\"";
     25 </script>