blob: 8858b4ea8f2607cbc1eae8cbd8a2af64704a13c5 (
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
|
<!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: Testing 'auto' min-sizing with definite min-width/height</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-size:12px; padding:0; margin:0; }
br { clear:both; }
.grid {
display: grid;
border: 1px dashed silver;
grid-template-columns: minmax(0,min-content);
grid-template-rows: minmax(0,min-content) minmax(0,min-content);
float: left;
margin-bottom:20px;
align-items: start;
justify-items: start;
}
.v {
writing-mode: vertical-lr;
-webkit-writing-mode: vertical-lr;
}
.h {
writing-mode: horizontal-tb;
-webkit-writing-mode: horizontal-tb;
}
.bb {
box-sizing: border-box;
}
span {
display: block;
background: lime;
margin: 7px 13px 50% 20%;
padding:1px 3px 10% 30%;
}
span.v {
height: 30px;
width: 10px;
border-left: 1px solid;
border-top: 3px solid;
}
span.h {
width: 30px;
height: 10px;
border-left: 3px solid;
border-top: 1px solid;
}
b40 {
display: block;
width: 40px;
height: 40px;
border: 1px solid pink;
z-index: 1; position:relative;
}
.h.r {
height: 42px;
width: 42px;
/* This margin-left is 20% of 98px-wide grid area */
margin-left: 19.6px;
/* This padding-bottom is 10% of 98px wide grid area */
/* This padding-left is 30% of 98px wide grid area */
padding: 1px 3px 9.8px 29.4px;
}
.v.r {
height: 42px;
width: 42px;
/* This margin-left is 20% of 54px-wide grid area */
margin-left: 10.8px;
/* This padding-bottom is 10% of 54px wide grid area */
/* This padding-left is 30% of 54px wide grid area */
padding: 1px 3px 5.4px 16.2px;
}
.r { position:relative; }
.t6 { width:46px; }
.t8 { width:118px; height: 102.5px; }
xx {
display: block;
background: lime;
padding:32px 32px 16px 32px;
margin: 0 0 32px 16px;
}
</style>
</head>
<body>
<div class="grid"><span class="h"><x></x></span></div>
<div class="grid"><span class="h bb"><x></x></span></div>
<div class="grid"><span class="h"><x></x></span><span class="h"><x></x></span></div>
<div class="grid" style="grid:48px / 122px"><span class="h r"><b40></b40></span></div>
<br>
<div class="grid"><span class="v"><x></x></span></div>
<div class="grid t6"><span class="v bb"><x></x></span></div>
<div class="grid"><span class="v"><x></x></span><span class="v"><x></x></span></div>
<div class="grid t8"><span class="v r"><b40></b40></span></div>
<div class="grid"><xx class="v"></xx></div>
<div class="grid v"><xx class="h"></xx></div>
</body>
</html>
|