blob: d2320ecbd174f9f741fd829057ada03ca8ec9b12 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
|
<!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: auto min-sizing with intrinsic min-width</title>
<link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1176775">
<style type="text/css">
body,html { color:black; background:white; font-family:monospace; font-size:16px; padding:0; margin:0; }
.grid {
display: grid;
grid-template-columns: minmax(min-content,0) minmax(0,1fr);
border: 1px solid;
width: 500px;
align-items: start;
justify-items: start;
}
span,img { min-height:0; }
.c1 { border:2px solid; min-width:auto; }
.c3 { background: blue; min-width:min-content; min-width:-webkit-min-content; }
.c4 { background: lime; min-width:max-content; min-width:-webkit-max-content; }
.c5 { background: cyan; min-width:-moz-available; min-width:-webkit-fill-available; }
.c6 { background: yellow; min-width:-moz-fit-content; min-width:-webkit-fit-content; }
.w20 { width: 20px; }
.w450 { width: 450px; }
.max50 { max-width: 50px; }
.h05 { height: 0.5px; }
.h4 { height: 4px; }
c2 { opacity:0.5; background: grey; min-height:10px; }
i { display:inline-block; width:20px; height:10px; background:blue; }
span, c2 { min-width:0; }
.rel { border:none; padding:2px; position:relative; }
.rel2 { border:none; position:relative; }
z { position:absolute; border:2px solid; width:450px; top:0;bottom:0;left:0; }
.rel2 z { border:none; background:inherit; }
</style>
</head>
<body>
<!--
<div class="grid">
<span class="c1"><i style="width:100px"></i></span><c2></c2>
</div>
-->
<div class="grid">
<span class="c1"></span><c2></c2>
</div>
<div class="grid">
<span class="c1 w20"><i></i><i></i><i></i><i></i><i></i></span><c2></c2>
</div>
<div class="grid">
<span class="c1 rel"><z></z><i style="width:100px;margin-right:-80px;"></i></span><c2></c2>
</div>
<!-- TODO: disabled until we have support for "transferred size"
<div class="grid">
<img class="c1" src="support/lime-25x1.png"><c2></c2>
</div>
<div class="grid">
<img class="c1" style="width:12.5px" src="support/lime-25x1.png"><c2></c2>
</div>
<div class="grid">
<img class="c1 h4" style="width:100px" src="support/lime-25x1.png"><c2></c2>
</div>
<div class="grid">
<img class="c1 h4 max50"style="width:50px" src="support/lime-25x1.png"><c2></c2>
</div>
<div class="grid">
<img class="c1 w20" src="support/lime-25x1.png"><c2></c2>
</div>
<div class="grid">
<span class="c1 rel2" style="height:22px;width:29px"><z style="width:450px;background:lime;border:2px solid;"></z></span><c2></c2>
</div>
<div class="grid">
<span class="c1 rel2" style="height:6px;width:29px"><z style="width:50px;background:lime;border:2px solid;"></z></span><c2></c2>
</div>
-->
<!--
<div class="grid" style="margin-left:300px; width:200px">
<span class="c3">1 2 3 4 5</span><c2></c2>
</div>
-->
<div class="grid">
<span class="c4"><i style="width:100px"></i></span><c2></c2>
</div>
<div class="grid">
<span class="c4"><i style="width:100px"></i></span><c2></c2>
</div>
<div class="grid">
<span class="c4 rel2"><z><i style="width:100px"></i></z><i style="width:100px"></i></span><c2></c2>
</div>
<div class="grid">
<span class="c4"><i style="width:100px"></i></span><c2></c2>
</div>
<div class="grid">
<span class="c5"><i></i><i></i><i></i><i></i><i></i></span><c2></c2>
</div>
<div class="grid" style="margin-left:40px;margin-bottom:100px">
<span class="c5"><i></i><i></i><i></i><i></i><i></i></span><c2></c2>
</div>
<div class="grid">
<span class="c5 rel2"><z><i style="width:100px"></i></z><i style="width:100px; margin-right:-80px;"></i></span><c2></c2>
</div>
<!-- TODO: row height doesn't seem right - revisit after bug 1174569
<div class="grid" style="margin-bottom:2em">
<span class="c5 w450 max50">1 2 3 4 5</span><c2></c2>
</div>
-->
<div class="grid">
<span class="c6"><i></i><i></i><i></i><i></i><i></i></span><c2></c2>
</div>
<div class="grid" style="margin-left:40px;margin-bottom:100px">
<span class="c6"><i></i><i></i><i></i><i></i><i></i></span><c2></c2>
</div>
<div class="grid">
<span class="c6 rel2"><z><i style="width:100px"></i></z><i style="width:100px; margin-right:-80px;"></i></span><c2></c2>
</div>
<!-- TODO: row height doesn't seem right - revisit after bug 1174569
<div class="grid" style="margin-bottom:2em">
<span class="c6 w450 max50">1 2 3 4 5</span><c2></c2>
</div>
-->
<!-- TODO: disabled until we have support for "transferred size"
<div class="grid">
<img class="c3" src="support/lime-25x1.png"><c2></c2>
</div>
<div class="grid">
<img class="c4" src="support/lime-25x1.png"><c2></c2>
</div>
-->
<!-- TODO: row height doesn't seem right - revisit after bug 1174569
<div class="grid">
<img class="c5" src="support/lime-25x1.png"><c2></c2>
</div>
-->
<!-- TODO: disabled until we have support for "transferred size"
<div class="grid">
<img class="c6" src="support/lime-25x1.png"><c2></c2>
</div>
<div class="grid" style="grid-template-columns:25px 1fr">
<img class="c6 w450" src="support/lime-25x1.png"><c2 class="rel2"></c2>
</div>
<div class="grid" style="grid-template-columns:25px 1fr">
<img class="c6 w450 max50" src="support/lime-25x1.png"><c2></c2>
</div>
-->
</body>
</html>
|