tor-browser

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

grid-lanes-subgrid-002d-ref.html (1693B)


      1 <!DOCTYPE HTML>
      2 <!--
      3     Any copyright is dedicated to the Public Domain.
      4     http://creativecommons.org/publicdomain/zero/1.0/
      5 -->
      6 <html><head>
      7  <meta charset="utf-8">
      8  <title>Reference: Grid Lanes layout with a subgrid (grid-lanes-subgrid-002d)</title>
      9  <link rel="author" title="Mats Palmgren" href="mailto:mats@mozilla.com">
     10 <style>
     11 html,body {
     12  color:black; background-color:white; font:10px/1 monospace; padding:0; margin:0;
     13 }
     14 
     15 grid {
     16  display: inline-grid;
     17  grid-template-rows: 40px 30px 20px;
     18  gap: 4px 2px;
     19  padding: 1px 3px 5px 7px;
     20  border: solid;
     21  border-width: 3px 5px 1px 1px;
     22  background: lightgrey content-box;
     23  grid-auto-flow: column;
     24 }
     25 .rows {
     26  grid-template-columns: 40px 30px 20px;
     27  grid-auto-flow: row;
     28 }
     29 item {
     30  background: grey;
     31  width: 3ch;
     32  position: relative;
     33 }
     34 item:nth-child(2n) { background:purple; width:auto; }
     35 item:nth-child(1) {
     36  border: solid;
     37  border-width: 3px 5px 1px 1px;
     38  margin: 7px 1px 5px 3px;
     39 }
     40 subgrid {
     41  display: grid;
     42  grid-row: auto/span 2;
     43  grid-column: auto/span 2;
     44  grid: subgrid / subgrid;
     45  grid-gap: 6px 8px;
     46  background: yellow;
     47 }
     48 subgrid.definite {
     49  grid-row-start:2;
     50 }
     51 subgrid.extent {
     52  grid-row: 1/span 3;
     53 }
     54 .rows > subgrid.definite {
     55  grid-column-start:2;
     56  grid-row-start:auto;
     57 }
     58 .rows > subgrid.extent {
     59  grid-row: auto/span 2;
     60  grid-column: 1/span 3;
     61 }
     62 </style>
     63 </head>
     64 <body>
     65 
     66 <!-- auto-placed subgrid inhibits subgridding when parent is doing grid-lanes layout ... -->
     67 
     68 <grid>
     69  <item>1</item>
     70  <item>2</item>
     71  <item>3</item>
     72  <subgrid class="extent" style="grid: 39px 28px 19px">
     73    <item>4a</item>
     74    <item>4b</item>
     75    <item>4c</item>
     76  </subgrid>
     77  <item>5</item>
     78 </grid>
     79 
     80 </body></html>