table-grid-item-dynamic-001.html (1082B)
1 <!doctype html> 2 <!-- 3 Any copyright is dedicated to the Public Domain. 4 http://creativecommons.org/publicdomain/zero/1.0/ 5 --> 6 <meta charset="utf-8"> 7 <title>Table grid items with margins don't grow on incremental relayout</title> 8 <link rel="author" href="mailto:mats@mozilla.com"> 9 <link rel="author" href="mailto:emilio@crisal.io"> 10 <link rel="author" href="https://mozilla.org"> 11 <link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1492315"> 12 <link rel="match" href="table-grid-item-dynamic-001-ref.html"> 13 <style> 14 html,body { 15 color:black; background-color:white; font:16px/1 monospace; padding:0; margin:0; 16 } 17 18 div { 19 display: grid; 20 background-color: lime; 21 } 22 23 table { 24 margin-top: 100px; 25 } 26 </style> 27 <div> 28 <table> 29 <thead> 30 <tr> 31 <th>Relayout shouldn't grow this table</th> 32 </tr> 33 </thead> 34 </table> 35 </div> 36 <script> 37 onload = function() { 38 let grid = document.querySelector("div"); 39 grid.getBoundingClientRect(); 40 document.body.style.width = "50vw"; 41 grid.getBoundingClientRect(); 42 document.body.style.width = ""; 43 } 44 </script>