tor-browser

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

dynamic-offset-vrl-001.html (1174B)


      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  overflow: hidden;
     16 }
     17 
     18 #container {
     19  position: absolute;
     20  top: 0;
     21  left: 0;
     22  width: 200px;
     23  height: 100px;
     24  background: yellow;
     25 }
     26 
     27 #abspos {
     28  position: absolute;
     29  top: 10px;
     30  right: 20px;
     31  width: 10px;
     32  height: 10px;
     33  background: fuchsia;
     34 }
     35 
     36 </style>
     37 
     38 <div id="container">
     39  <div id="abspos"></div>
     40 </div>
     41 
     42 <script>
     43 
     44 window.addEventListener("load", function(event) {
     45  var e = document.getElementById("abspos");
     46  e.offsetTop; // flush layout
     47  e.parentNode.style.width = "100px";
     48 });
     49 
     50 </script>