File: subgrid-mbp-overflow-003-ref.html

package info (click to toggle)
thunderbird 1%3A91.13.0-1~deb11u1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 2,953,400 kB
  • sloc: cpp: 6,084,049; javascript: 4,790,441; ansic: 3,341,496; python: 862,958; asm: 366,542; xml: 204,277; java: 152,477; sh: 111,436; makefile: 21,388; perl: 15,312; yacc: 4,583; objc: 3,026; lex: 1,720; exp: 762; pascal: 635; awk: 564; sql: 453; php: 436; lisp: 432; ruby: 99; sed: 69; csh: 45
file content (173 lines) | stat: -rw-r--r-- 3,811 bytes parent folder | download | duplicates (8)
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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
<!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: subgrid margin/border/padding that overflow the edge track</title>
  <link rel="author" title="Mats Palmgren" href="mailto:mats@mozilla.com">
<style>
html,body {
  color:black; background-color:white; font:16px/1 monospace; margin:0; padding:0;
}

.grid {
  display: inline-grid;
  grid: auto / 7px 30px 10px 20px 5px;
  justify-content: space-around;
  align-content: start;
  border: 3px solid;
  width: 80px;
}
.rtl { direction: rtl; }
.ltr { direction: ltr; }

.subgrid {
  display: grid;
  justify-content: space-between;
  justify-self: self-start;
  min-width: 0;
  min-height: 30px;
  background: pink;
  border:1px solid;
  margin: 0 4px 0 3px;
  position: relative;
}
.c1 { grid-column: 4 / span 1; }
.c3 { grid-column: 2 / span 3; }

y {
  background: blue;
  height: 10px;
}
y:nth-of-type(1) { grid-column: 2; }
y:nth-of-type(2) { grid-column: 4; }

x { background: silver; border-inline-start: 2px solid lime; }
x:nth-of-type(2) { background: purple; }
x:nth-of-type(3) { background: magenta; }

a {
  position: absolute;
  grid-column-start: 1;
  inset: 0;
  top: 3px;
  border-top: 2px solid grey;
}
a:nth-of-type(2) {
  grid-column-start: 2;
  top: 6px;
}
a:nth-of-type(3) {
  grid-column-start: 3;
  top: 9px;
}

b {
  position: absolute;
  grid-column-end: 1;
  inset: 0;
  top: 12px;
  border-top: 2px solid grey;
}
b:nth-of-type(2) {
  grid-column-end: 2;
  top: 15px;
}
b:nth-of-type(3) {
  grid-column-end: 3;
  top: 18px;
}

.f { float:left; margin-left:10px; }

.c1 { width: 30px; }
.ltr.c1.pl > x, .rtl.c1.pr > x {
  padding-inline-start: 15px;
  border-inline: none;
  border-inline-end: 2px solid lime;
  background: pink;
}
.ltr.c1.pl > x { padding-inline-start: 16px; }
.rtl.c1.pr > a { width: 15px; margin-inline-start: 15px; }
.ltr.c1.pl > a { width: 14px; margin-inline-start: 16px;}
.rtl.c1.pr > b { width: 15px; }
.ltr.c1.pl > b { width: 16px; }

.c3 { width: 55px; grid: auto / 15px 10px 26px; }
.rtl.c3.pl { padding-inline-end: 4px; }
.ltr.c3.pr { padding-inline-end: 5px; }
.ltr.c3 { grid: auto / 16px 10px 25px; }
.rtl.c3.pr > a:nth-of-type(1) { width: 40px; right: 15px; }
.ltr.c3.pl > a:nth-of-type(1) { width: 39px; left: 16px; }
.rtl.c3.pr > b:nth-of-type(1),
.rtl.c3.pr > b:nth-of-type(2){ width: 15px; }
.ltr.c3.pl > b:nth-of-type(1),
.ltr.c3.pl > b:nth-of-type(2){ width: 16px; }

x.zero { background: pink; }
</style>
</head>
<body>

<div class=f>
<div class="grid ltr">
  <y></y><y></y>
  <div class="subgrid rtl c3 pr"><x class="zero" style="margin-right:15px"></x><a></a><b></b><x></x><a></a><b></b><x></x><a></a><b></b></div>
</div>

<br>

<div class="grid ltr">
  <y></y><y></y>
  <div class="subgrid rtl c3 pl"><x></x><a></a><b></b><x></x><a></a><b></b><x class="zero"></x><a></a><b></b></div>
</div>

<br>

<div class="grid rtl">
  <y></y><y></y>
  <div class="subgrid ltr c3 pr"><x></x><a></a><b></b><x></x><a></a><b></b><x class="zero"></x><a></a><b></b></div>
</div>

<br>

<div class="grid rtl">
  <y></y><y></y>
  <div class="subgrid ltr c3 pl"><x class="zero" style="margin-left:16px"></x><a></a><b></b><x></x><a></a><b></b><x></x><a></a><b></b></div>
</div>

</div>

<div class=f>
<div class="grid ltr">
  <y></y><y></y>
  <div class="subgrid rtl c1 pr"><x></x><a></a><b></b></div>
</div>

<br>

<div class="grid ltr">
  <y></y><y></y>
  <div class="subgrid rtl c1 pl"><x></x><a></a><b></b></div>
</div>

<br>

<div class="grid rtl">
  <y></y><y></y>
  <div class="subgrid ltr c1 pr"><x></x><a></a><b></b></div>
</div>

<br>

<div class="grid rtl">
  <y></y><y></y>
  <div class="subgrid ltr c1 pl"><x></x><a></a><b></b></div>
</div>

</div>

</body>
</html>