tor-browser

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

dynamic-offset-vrl-rtl-001.html (1195B)


      1 <!DOCTYPE HTML>
      2 <head>
      3 <meta charset="UTF-8">
      4 <title>CSS Test: dynamic changes to offset properties</title>
      5 <link rel="author" title="L. David Baron" href="https://dbaron.org/">
      6 <link rel="author" title="Mozilla" href="https://www.mozilla.org/">
      7 <link rel="help" href="https://drafts.csswg.org/css-writing-modes-3/#vertical-layout">
      8 <link rel="match" href="dynamic-offset-rtl-001-ref.html">
      9 <meta name="flags" content="dom">
     10 <meta name="assert" content="Layout rules for 'right' and 'left' are handled correctly for absolutely positioned elements, in the presence of dynamic changes to 'width' of the containing block.">
     11 <style>
     12 
     13 html {
     14  writing-mode: vertical-rl;
     15  direction: rtl;
     16  overflow: hidden;
     17 }
     18 
     19 #container {
     20  position: absolute;
     21  top: 0;
     22  left: 0;
     23  width: 100px;
     24  height: 200px;
     25  background: yellow;
     26 }
     27 
     28 #abspos {
     29  position: absolute;
     30  bottom: 80px;
     31  left: 70px;
     32  width: 10px;
     33  height: 10px;
     34  background: fuchsia;
     35 }
     36 
     37 </style>
     38 
     39 <div id="container">
     40  <div id="abspos"></div>
     41 </div>
     42 
     43 <script>
     44 
     45 window.addEventListener("load", function(event) {
     46  var e = document.getElementById("abspos");
     47  e.offsetTop; // flush layout
     48  e.parentNode.style.height = "100px";
     49 });
     50 
     51 </script>