blob: 21e56b66ffde95c69da720c7006cc5e33d708cb3 [file] [log] [blame]
<!DOCTYPE HTML>
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<html><head>
<meta charset="utf-8">
<title>Reference: repeat(auto-fill/auto-fit)</title>
<link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1118820">
<style type="text/css">
html,body {
color:black; background-color:white; font-size:16px;
}
.grid {
display: grid;
float: left;
position: relative;
border: 2px solid;
grid-auto-columns: 10px;
grid-auto-rows: 10px;
grid-auto-flow: column;
grid-gap: 2px;
margin-right: 2px;
padding-top: 3px;
padding-bottom: 2px;
}
.r0 { grid-template-rows: [a] repeat(1, [b] 0 [c]) [d]; }
.r10,.r1 { grid-template-rows: [a] repeat(1, [b] 20px [c]) [d]; }
.r01 { grid-template-rows: [a] repeat(1, [b] 0 [c]) 20px [d]; grid-gap:0;}
.r01 a {grid-row-end:auto; }
.r2 { grid-template-rows: [a] repeat(1, [b] 20px [c]) [d] 30px [e]; }
.r20 { width:22px; grid-template-rows: [a] repeat(1, [b] 20px [c]) [d] 30px [e]; }
.r02 { grid-template-rows: [a] repeat(1, [b] 0 [c]) [d] 30px [e]; }
.r30,.r3 { grid-template-rows: [a] repeat(1, [b] 20px [c]) [d] 30px [e] 30px [f]; }
.r03 { grid-template-rows: [a] repeat(1, [b] 0px [c]) [d] 30px [e] 30px [f]; }
.r003 { grid-template-rows: [a] repeat(1, [b] 0px [c]) [d] 30px [e] 30px [f]; }
.ra { grid-template-rows: [a] repeat(1, [b] 20px [c]) [d] 30px [e] 10px [f]; }
.r0a { grid-template-rows: [a] repeat(1, [b] 0 [c]) [d] 30px [e] auto [f]; grid-gap:0; padding-bottom:4px;}
fit .r0 { grid-template-rows: [a] repeat(1, [b] 0 [c]) [d]; }
fit .r1 { grid-template-rows: [a] repeat(1, [b] 20px [c]) [d]; }
fit .r2 { grid-template-rows: [a] repeat(1, [b] 20px [c]) [d] 30px [e]; }
fit .r02 { grid-template-rows: [a] repeat(1, [b] 0 [c]) [d] 30px [e]; grid-gap:0;}
fit .r3 { grid-template-rows: [a] repeat(1, [b] 20px [c]) [d] 30px [e] 30px [f]; }
fit .r03 { grid-template-rows: [a] repeat(1, [b] 0 [c]) [d] 30px [e] 30px [f]; grid-gap:0; }
fit .r003 { grid-template-rows: [a] repeat(1, [b] 0 [c]) [d] 30px [e] 30px [f]; grid-gap:0; padding-bottom:4px;}
fit .ra { grid-template-rows: [a] repeat(1, [b] 20px [c]) [d] 30px [e] 10px [f]; }
.w100 { height: 100px; }
.w3 { height: 3px; }
.w20 { height: 20px; }
.w50 { height: 50px; }
.w80 { height: 80px; }
.mw100 { min-height: 100px; }
.mw3 { height: 3px; }
.mw20 { height: 20px; }
.mw50 { min-height: 50px; }
.mw80 { min-height: 80px; }
.xw100 { max-height: 100px; }
.xw3 { height: 3px; }
.xw20 { height: 20px; }
.xw50 { max-height: 50px; }
.xw80 { max-height: 80px; }
.w { width:10px}
x {
height: 10px;
background: grey;
}
a {
position: absolute;
left:0; top:0; bottom:0; width: 3px;
background: black;
grid-row: c / c -1;
}
b {
position: absolute;
right:0; top:0; bottom:0; width: 3px;
background: brown;
grid-row: auto / c -1;
}
x:first-child {
background: lime;
}
x:last-child {
background: blue;
}
fill,fit {
float: left;
height: 400px;
}
</style>
</head>
<body>
<fill>
<div class="grid r1 w20"><x></x><x></x><a></a><b></b><x></x></div>
<div class="grid r1 w3"><x></x><x></x><a></a><b></b><x></x></div>
<div class="grid r1 xw20"><x></x><x></x><a></a><b></b><x></x></div>
<div class="grid r1 xw3"><x></x><x></x><a></a><b></b><x></x></div>
<div class="grid r1 mw20"><x></x><x></x><a></a><b></b><x></x></div>
<div class="grid r1 mw3"><x></x><x></x><a></a><b></b><x></x></div>
<div class="grid r1 w20 xw3"><x></x><x></x><a></a><b></b><x></x></div>
<div class="grid r1 w3 mw20"><x></x><x></x><a></a><b></b><x></x></div>
<div class="grid r1 w3 mw3"><x></x><x></x><a></a><b></b><x></x></div>
<div class="grid r1 xw20"><x></x><x></x><a></a><b></b><x></x></div>
<div class="grid r1 xw3 mw20"><x></x><x></x><a></a><b></b><x></x></div>
<div class="grid r1 mw20"><x></x><x></x><a></a><b></b><x></x></div>
<br clear="all">
<br clear="all">
<div class="grid r1 w w20"><a></a><b></b></div>
<div class="grid r1 w w3"><a></a><b></b></div>
<div class="grid r1 w xw20"><a></a><b></b></div>
<div class="grid r1 w xw3"><a></a><b></b></div>
<div class="grid r1 w mw20"><a></a><b></b></div>
<div class="grid r1 w mw3"><a></a><b></b></div>
<div class="grid r1 w w20 xw3"><a></a><b></b></div>
<div class="grid r1 w w3 mw20"><a></a><b></b></div>
<div class="grid r1 w w3 mw3"><a></a><b></b></div>
<div class="grid r1 w xw20"><a></a><b></b></div>
<div class="grid r1 w xw3 mw20"><a></a><b></b></div>
<div class="grid r1 w mw20"><a></a><b></b></div>
<div class="grid r1" style="min-height:0"><x></x><x></x><a></a><b></b><x></x></div>
<div class="grid r1" style="height:0"><x></x><x></x><a></a><b></b><x></x></div>
<div class="grid r1" style="min-height:0; height:0"><x></x><x></x><a></a><b></b><x></x></div>
<div class="grid r1" style="max-height:0"><x></x><x></x><a></a><b></b><x></x></div>
<div class="grid r0"><x></x><x></x><a></a><b></b><x></x></div>
<div class="grid ra"><x></x><x></x><a></a><b></b><x></x></div>
<div class="grid w r1" style="min-height:0"><a></a><b></b></div>
<div class="grid w r1" style="height:0"><a></a><b></b></div>
<div class="grid w r1" style="min-height:0; height:0"><a></a><b></b></div>
<div class="grid w r1" style="max-height:0"><a></a><b></b></div>
<div class="grid w r0"><a></a><b></b></div>
<div class="grid w ra"><a></a><b></b></div>
<br clear="all">
<br clear="all">
<div class="grid r20 w20"><x></x><x></x><a></a><b></b><x></x></div>
<div class="grid r20 w3"><x></x><x></x><a></a><b></b><x></x></div>
<div class="grid r20 xw20"><x></x><x></x><a></a><b></b><x></x></div>
<div class="grid r20 xw3"><x></x><x></x><a></a><b></b><x></x></div>
<div class="grid r20 mw20"><x></x><x></x><a></a><b></b><x></x></div>
<div class="grid r20 mw3"><x></x><x></x><a></a><b></b><x></x></div>
<div class="grid r20 w20 xw3"><x></x><x></x><a></a><b></b><x></x></div>
<div class="grid r20 w3 mw20"><x></x><x></x><a></a><b></b><x></x></div>
<div class="grid r20 w3 mw3"><x></x><x></x><a></a><b></b><x></x></div>
<div class="grid r20 xw20"><x></x><x></x><a></a><b></b><x></x></div>
<div class="grid r20 xw3 mw20"><x></x><x></x><a></a><b></b><x></x></div>
<div class="grid r20 mw20"><x></x><x></x><a></a><b></b><x></x></div>
<br clear="all">
<br clear="all">
<div class="grid r20 w w20"><a></a><b></b></div>
<div class="grid r20 w w3"><a></a><b></b></div>
<div class="grid r20 w xw20"><a></a><b></b></div>
<div class="grid r20 w xw3"><a></a><b></b></div>
<div class="grid r20 w mw20"><a></a><b></b></div>
<div class="grid r20 w mw3"><a></a><b></b></div>
<div class="grid r20 w w20 xw3"><a></a><b></b></div>
<div class="grid r20 w w3 mw20"><a></a><b></b></div>
<div class="grid r20 w w3 mw3"><a></a><b></b></div>
<div class="grid r20 w xw20"><a></a><b></b></div>
<div class="grid r20 w xw3 mw20"><a></a><b></b></div>
<div class="grid r20 w mw20"><a></a><b></b></div>
<div class="grid r20" style="min-height:0"><x></x><x></x><a></a><b></b><x></x></div>
<div class="grid r20" style="height:0"><x></x><x></x><a></a><b></b><x></x></div>
<div class="grid r20" style="min-height:0; height:0"><x></x><x></x><a></a><b></b><x></x></div>
<div class="grid r20" style="max-height:0"><x></x><x></x><a></a><b></b><x></x></div>
<div class="grid r0"><x></x><x></x><a></a><b></b><x></x></div>
<div class="grid ra"><x></x><x></x><a></a><b></b><x></x></div>
<div class="grid w r20" style="min-height:0"><a></a><b></b></div>
<div class="grid w r20" style="height:0"><a></a><b></b></div>
<div class="grid w r20" style="min-height:0; height:0"><a></a><b></b></div>
<div class="grid w r20" style="max-height:0"><a></a><b></b></div>
<div class="grid w r02"><a></a><b></b></div>
<br clear="all">
<br clear="all">
<div class="grid r30 w w20"><x></x><x></x><a></a><b></b><x></x></div>
<div class="grid r30 w w3"><x></x><x></x><a></a><b></b><x></x></div>
<div class="grid r30 w xw20"><x></x><x></x><a></a><b></b><x></x></div>
<div class="grid r30 w xw3"><x></x><x></x><a></a><b></b><x></x></div>
<div class="grid r30 w mw20"><x></x><x></x><a></a><b></b><x></x></div>
<div class="grid r30 w mw3"><x></x><x></x><a></a><b></b><x></x></div>
<div class="grid r30 w w20 xw3"><x></x><x></x><a></a><b></b><x></x></div>
<div class="grid r30 w w3 mw20"><x></x><x></x><a></a><b></b><x></x></div>
<div class="grid r30 w w3 mw3"><x></x><x></x><a></a><b></b><x></x></div>
<div class="grid r30 w xw20"><x></x><x></x><a></a><b></b><x></x></div>
<div class="grid r30 w xw3 mw20"><x></x><x></x><a></a><b></b><x></x></div>
<div class="grid r30 w mw20"><x></x><x></x><a></a><b></b><x></x></div>
<br clear="all">
<br clear="all">
<div class="grid r30 w w20"><a></a><b></b></div>
<div class="grid r30 w w3"><a></a><b></b></div>
<div class="grid r30 w xw20"><a></a><b></b></div>
<div class="grid r30 w xw3"><a></a><b></b></div>
<div class="grid r30 w mw20"><a></a><b></b></div>
<div class="grid r30 w mw3"><a></a><b></b></div>
<div class="grid r30 w w20 xw3"><a></a><b></b></div>
<div class="grid r30 w w3 mw20"><a></a><b></b></div>
<div class="grid r30 w w3 mw3"><a></a><b></b></div>
<div class="grid r30 w xw20"><a></a><b></b></div>
<div class="grid r30 w xw3 mw20"><a></a><b></b></div>
<div class="grid r30 w mw20"><a></a><b></b></div>
<div class="grid w r30" style="min-height:0"><x></x><x></x><a></a><b></b><x></x></div>
<div class="grid w r30" style="height:0"><x></x><x></x><a></a><b></b><x></x></div>
<div class="grid w r30" style="min-height:0; height:0"><x></x><x></x><a></a><b></b><x></x></div>
<div class="grid w r30" style="max-height:0"><x></x><x></x><a></a><b></b><x></x></div>
<div class="grid r0"><x></x><x></x><a></a><b></b><x></x></div>
<div class="grid ra"><x></x><x></x><a></a><b></b><x></x></div>
<div class="grid w r30" style="min-height:0"><a></a><b></b></div>
<div class="grid w r30" style="height:0"><a></a><b></b></div>
<div class="grid w r30" style="min-height:0; height:0"><a></a><b></b></div>
<div class="grid w r30" style="max-height:0"><a></a><b></b></div>
<div class="grid w r003"><a></a><b></b></div>
</fill>
<!-- The original 005 test from Mozilla had also tests for auto-fit. They were moved to part-2 as it
is not possible to fit all the contents in the viewport without scroll (required by reftests). -->
</body>
</html>