fune/layout/docs/css-grid-3/examples/justify-tracks-example-1.html
Mats Palmgren 30b76b523c Bug 1665152 - Initial CSS Masonry draft spec. r=dholbert
NPOTB DONTBUILD

The Overview.html file was generated by this command:
curl https://api.csswg.org/bikeshed/ -F file=@layout/docs/css-grid-3/Overview.bs -F force=1 > layout/docs/css-grid-3/Overview.html

Differential Revision: https://phabricator.services.mozilla.com/D90302
2020-09-23 15:56:38 +00:00

59 lines
1.4 KiB
HTML

<!DOCTYPE HTML>
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<style>
.grid {
display: inline-grid;
grid: 150px 100px 50px / masonry;
gap: 3px;
padding: 10px;
border: 3px solid;
background: lightgrey content-box;
justify-tracks: stretch;
width: 150px;
transition: width 6s linear;
}
item {
display: list-item;
list-style-type: decimal;
list-style-position: inside;
background: grey;
width: 3ch;
position: relative;
}
item:nth-child(2n) { background:purple; width:auto; }
item:nth-child(1) { border:10px solid; margin: 10px 0 5px 3px; }
z { display: block; background: yellow; width: 20%; height:10%; }
a {
position: absolute;
inset: 0;
left: auto;
border: 2px solid lime;
}
</style>
<body onload="[...document.querySelectorAll('.grid')].forEach(e=>e.style.width='600px')">
<div class="grid">
<item></item>
<item></item>
<item></item>
<item style="max-width:80px; margin-right: 10px">80px</item>
<item></item>
<item><a></a></item>
<item></item>
<item style="writing-mode:vertical-lr">vertical</item>
<item><a></a></item>
<item>A<br>B</item>
<item></item>
<item><z></z></item>
<item></item>
<item><z></z><a></a></item>
<item></item>
<item style="justify-self:start"></item>
<item></item>
<item style="margin:0 auto"></item>
<item></item>
<item style="margin-left: auto"></item>
</div><td>