blob: 934b4ff595e8d1be8819a9b117ebf7514f5bfeae (
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
|
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Test: summary with 'display: grid'</title>
<link rel="author" title="Xing Xu" href="mailto:xing.xu@intel.com">
<link rel="match" href="summary-display-grid-ref.html">
<link rel="help" href="https://html.spec.whatwg.org/multipage/rendering.html#the-details-and-summary-elements">
<meta name="assert" content="Checks that styling a <summary> with 'display: grid' makes it a grid container.">
<style>
.grid-container {
display: grid;
grid-template-columns: 200px 10px 0.3fr 10px 0.7fr;
grid-template-rows: auto 20px auto;
}
.grid-element {
background-color: #444;
color: #fff;
padding: 20px;
font-size: 2em;
}
.element-a {
grid-column-start: 1;
grid-column-end: ;
grid-row-start: 1;
grid-row-end: 2;
background: #6F9;
}
.element-b {
grid-column-start: 3;
grid-column-end: 4;
grid-row-start: 1;
grid-row-end: 2;
background: #69F;
}
.element-c {
grid-column-start: 5;
grid-column-end: 6;
grid-row-start: 1;
grid-row-end: 2;
background: #F69;
}
.element-d {
grid-column-start: 1;
grid-column-end: 2;
grid-row-start: 3;
grid-row-end: 4;
background: #9F6;
}
.element-e {
grid-column-start: 3;
grid-column-end: 4;
grid-row-start: 3;
grid-row-end: 4;
background: #96F;
}
.element-f {
grid-column-start: 5;
grid-column-end: 6;
grid-row-start: 3;
grid-row-end: 4;
background: #F96;
}
</style>
<summary class="grid-container">
<div class="grid-element element-a">A</div>
<div class="grid-element element-b">B</div>
<div class="grid-element element-c">C</div>
<div class="grid-element element-d">D</div>
<div class="grid-element element-e">E</div>
<div class="grid-element element-f">F</div>
</summary>
|