dynamic-offset-vrl-rtl-002.html (1222B)
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 top: 80px; /* ignored */ 33 width: 10px; 34 height: 10px; 35 background: fuchsia; 36 } 37 38 </style> 39 40 <div id="container"> 41 <div id="abspos"></div> 42 </div> 43 44 <script> 45 46 window.addEventListener("load", function(event) { 47 var e = document.getElementById("abspos"); 48 e.offsetTop; // flush layout 49 e.parentNode.style.height = "100px"; 50 }); 51 52 </script>