tor-browser

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

table-grid-item-dynamic-002.html (1187B)


      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 min-height should shrink after setting a smaller min-height</title>
      8 <link rel="author" href="mailto:mats@mozilla.com">
      9 <link rel="author" href="mailto:emilio@crisal.io">
     10 <link rel="author" href="mailto:tlin@mozilla.com">
     11 <link rel="author" href="https://mozilla.org">
     12 <link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1527734">
     13 <link rel="match" href="table-grid-item-dynamic-002-ref.html">
     14 <style>
     15 html,body {
     16  color:black; background-color:white; font:16px/1 monospace; padding:0; margin:0;
     17 }
     18 
     19 div {
     20  display: grid;
     21  background-color: lime;
     22 }
     23 
     24 table {
     25  min-height: 500px;
     26 }
     27 </style>
     28 
     29 <div>
     30  <table>
     31    <caption>Table caption</caption>
     32    <thead>
     33      <tr>
     34        <th>This table should shrink after setting a smaller min-height</th>
     35      </tr>
     36    </thead>
     37  </table>
     38 </div>
     39 <script>
     40 onload = function() {
     41  let grid = document.querySelector("div");
     42  let table = grid.querySelector("table");
     43  grid.getBoundingClientRect();
     44  table.style.minHeight = "100px";
     45 }
     46 </script>