2015-09-04 23:06:58 +03:00
|
|
|
<!DOCTYPE HTML>
|
|
|
|
<!--
|
|
|
|
Any copyright is dedicated to the Public Domain.
|
|
|
|
http://creativecommons.org/publicdomain/zero/1.0/
|
|
|
|
-->
|
|
|
|
<html><head>
|
|
|
|
<meta charset="utf-8">
|
2016-04-25 19:43:04 +03:00
|
|
|
<title>Reference: flex/auto min-sizing</title>
|
2015-09-04 23:06:58 +03:00
|
|
|
<link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1151212">
|
|
|
|
<style type="text/css">
|
|
|
|
body,html { color:black; background:white; font-family:monospace; font-size:16px; padding:0; margin:0; }
|
|
|
|
|
|
|
|
.grid {
|
|
|
|
display: grid;
|
|
|
|
border: 1px solid;
|
|
|
|
float: left;
|
|
|
|
}
|
|
|
|
|
|
|
|
.g0 {
|
|
|
|
display: grid;
|
|
|
|
grid-template-columns: minmax(min-content,min-content);
|
|
|
|
border:1px solid;
|
|
|
|
float: left;
|
|
|
|
margin-right: 20px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.g1 {
|
2016-09-27 18:05:41 +03:00
|
|
|
grid-template-columns: 4px
|
2016-04-25 19:43:04 +03:00
|
|
|
minmax(0,0)
|
|
|
|
minmax(0,0)
|
2015-09-04 23:06:58 +03:00
|
|
|
1fr;
|
2016-09-27 18:05:41 +03:00
|
|
|
min-width: 24px;
|
2015-09-04 23:06:58 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
.g2 {
|
2016-09-27 18:05:41 +03:00
|
|
|
grid-template-columns: min-content
|
2016-04-25 19:43:04 +03:00
|
|
|
0
|
|
|
|
0
|
2015-09-04 23:06:58 +03:00
|
|
|
1fr;
|
|
|
|
}
|
|
|
|
|
|
|
|
.g3 {
|
2016-09-27 18:05:41 +03:00
|
|
|
grid-template-columns: min-content
|
2016-04-25 19:43:04 +03:00
|
|
|
0
|
|
|
|
0
|
2015-09-04 23:06:58 +03:00
|
|
|
1fr;
|
|
|
|
}
|
|
|
|
|
|
|
|
.g4 {
|
2016-04-25 19:43:04 +03:00
|
|
|
grid-template-columns: minmax(2px,0)
|
|
|
|
1px
|
|
|
|
1px
|
2016-09-27 18:05:41 +03:00
|
|
|
20px;
|
2015-09-04 23:06:58 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
.g5 {
|
|
|
|
grid-template-columns: minmax(20px,0)
|
|
|
|
minmax(0,0)
|
|
|
|
minmax(0,0)
|
2016-09-27 18:05:41 +03:00
|
|
|
4px;
|
2015-09-04 23:06:58 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
.g6 {
|
2016-09-27 18:05:41 +03:00
|
|
|
grid-template-columns: minmax(1.333333px,0)
|
|
|
|
minmax(1.333333px,0)
|
|
|
|
minmax(1.333333px,0)
|
2015-09-04 23:06:58 +03:00
|
|
|
20px;
|
2016-09-27 18:05:41 +03:00
|
|
|
min-width: 44px;
|
2015-09-04 23:06:58 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
.g7 {
|
|
|
|
grid-template-columns: minmax(20px,1fr)
|
|
|
|
minmax(min-content,0)
|
|
|
|
minmax(min-content,0)
|
|
|
|
20px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.g8 {
|
|
|
|
grid-template-columns: minmax(min-content,1fr)
|
|
|
|
minmax(min-content,0)
|
|
|
|
minmax(min-content,0)
|
|
|
|
20px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.g9 {
|
|
|
|
grid-template-columns: 20px
|
|
|
|
30px
|
|
|
|
minmax(min-content,0)
|
|
|
|
10px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.gA {
|
|
|
|
grid-template-columns: minmax(min-content,0)
|
|
|
|
minmax(min-content,40px)
|
|
|
|
minmax(min-content,0)
|
|
|
|
20px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.gB {
|
2016-09-27 18:05:41 +03:00
|
|
|
grid-template-columns: 24px
|
2016-04-25 19:43:04 +03:00
|
|
|
0
|
|
|
|
0
|
2015-09-04 23:06:58 +03:00
|
|
|
20px;
|
2016-09-27 18:05:41 +03:00
|
|
|
min-width: 44px;
|
2015-09-04 23:06:58 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
.gC {
|
2016-09-27 18:05:41 +03:00
|
|
|
grid-template-columns: minmax(24px,0)
|
2016-04-25 19:43:04 +03:00
|
|
|
0
|
|
|
|
0
|
2015-09-04 23:06:58 +03:00
|
|
|
20px;
|
2016-09-27 18:05:41 +03:00
|
|
|
min-width: 44px;
|
2015-09-04 23:06:58 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
.gD {
|
2016-09-27 18:05:41 +03:00
|
|
|
grid-template-columns: minmax(24px,0)
|
2016-04-25 19:43:04 +03:00
|
|
|
0
|
|
|
|
0
|
|
|
|
0;
|
2015-09-04 23:06:58 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
.gE {
|
2016-09-27 18:05:41 +03:00
|
|
|
grid-template-columns: minmax(8px,0)
|
|
|
|
minmax(8px,0)
|
|
|
|
minmax(8px,0)
|
2016-04-25 19:43:04 +03:00
|
|
|
0px;
|
2015-09-04 23:06:58 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
.gF {
|
2018-03-16 00:41:25 +03:00
|
|
|
grid-template-columns: 2px
|
|
|
|
20px
|
|
|
|
2px
|
|
|
|
0;
|
2015-09-04 23:06:58 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.t { grid-column: span 3; border:2px solid; }
|
|
|
|
.d1 { grid-column: 1 / span 2; background: grey; }
|
|
|
|
.d3 { grid-column: 3 / span 2; background: blue; }
|
|
|
|
div { min-width:0; min-height:10px; }
|
|
|
|
t { display:inline-block; width:20px; }
|
|
|
|
|
|
|
|
</style>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="g0">
|
|
|
|
<div class="g1 grid">
|
|
|
|
<div class="t"><t>1 </t><t>2 </t><t>3 </t><t>4 </t><t>5</t></div>
|
|
|
|
<div class="d1"></div>
|
|
|
|
<div class="d3"></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="g0">
|
|
|
|
<div class="g2 grid">
|
|
|
|
<div class="t"><t>1 </t><t>2 </t><t>3 </t><t>4 </t><t>5</t></div>
|
|
|
|
<div class="d1"></div>
|
|
|
|
<div class="d3"></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="g0">
|
|
|
|
<div class="g3 grid">
|
|
|
|
<div class="t"><t>1 </t><t>2 </t><t>3 </t><t>4 </t><t>5</t></div>
|
|
|
|
<div class="d1"></div>
|
|
|
|
<div class="d3"></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="g0">
|
|
|
|
<div class="g4 grid">
|
|
|
|
<div class="t"><t>1 </t><t>2 </t><t>3 </t><t>4 </t><t>5</t></div>
|
|
|
|
<div class="d1"></div>
|
|
|
|
<div class="d3"></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="g0">
|
|
|
|
<div class="g5 grid">
|
|
|
|
<div class="t"><t>1 </t><t>2 </t><t>3 </t><t>4 </t><t>5</t></div>
|
|
|
|
<div class="d1"></div>
|
|
|
|
<div class="d3"></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<br clear="all" style="margin-top:100px">
|
|
|
|
|
|
|
|
<div class="g0">
|
|
|
|
<div class="g6 grid">
|
|
|
|
<div class="t"><t>1 </t><t>2 </t><t>3 </t><t>4 </t><t>5</t></div>
|
|
|
|
<div class="d1"></div>
|
|
|
|
<div class="d3"></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="g0">
|
|
|
|
<div class="g7 grid">
|
|
|
|
<div class="t"><t>1 </t><t>2 </t><t>3 </t><t>4 </t><t>5</t></div>
|
|
|
|
<div class="d1"></div>
|
|
|
|
<div class="d3"></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="g0">
|
|
|
|
<div class="g8 grid">
|
|
|
|
<div class="t"><t>1 </t><t>2 </t><t>3 </t><t>4 </t><t>5</t></div>
|
|
|
|
<div class="d1"></div>
|
|
|
|
<div class="d3"></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="g0">
|
|
|
|
<div class="g9 grid">
|
|
|
|
<div class="t"><t>1 </t><t>2 </t><t>3 </t><t>4 </t><t>5</t></div>
|
|
|
|
<div class="d1"></div>
|
|
|
|
<div class="d3"></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<br clear="all" style="margin-top:100px">
|
|
|
|
|
|
|
|
<div class="g0">
|
|
|
|
<div class="gA grid">
|
|
|
|
<div class="t"><t>1 </t><t>2 </t><t>3 </t><t>4 </t><t>5</t></div>
|
|
|
|
<div class="d1"></div>
|
|
|
|
<div class="d3"></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="g0">
|
|
|
|
<div class="gB grid">
|
|
|
|
<div class="t"><t>1 </t><t>2 </t><t>3 </t><t>4 </t><t>5</t></div>
|
|
|
|
<div class="d1"></div>
|
|
|
|
<div class="d3"></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="g0">
|
|
|
|
<div class="gC grid">
|
|
|
|
<div class="t"><t>1 </t><t>2 </t><t>3 </t><t>4 </t><t>5</t></div>
|
|
|
|
<div class="d1"></div>
|
|
|
|
<div class="d3"></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="g0">
|
|
|
|
<div class="gD grid">
|
|
|
|
<div class="t"><t>1 </t><t>2 </t><t>3 </t><t>4 </t><t>5</t></div>
|
|
|
|
<div class="d1"></div>
|
|
|
|
<div class="d3"></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="g0">
|
|
|
|
<div class="gE grid">
|
|
|
|
<div class="t"><t>1 </t><t>2 </t><t>3 </t><t>4 </t><t>5</t></div>
|
|
|
|
<div class="d1"></div>
|
|
|
|
<div class="d3"></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="g0">
|
|
|
|
<div class="gF grid">
|
|
|
|
<div class="t"><t>1 </t><t>2 </t><t>3 </t><t>4 </t><t>5</t></div>
|
|
|
|
<div class="d1"></div>
|
|
|
|
<div class="d3"></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
</body>
|
|
|
|
</html>
|