summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/rendering/the-details-element/summary-display-inline-flex.html
blob: 2c935e42b8669c55714de9b1863b73698dd484a0 (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
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Test: summary with 'display: inline-flex'</title>
<link rel="author" title="Xing Xu" href="mailto:xing.xu@intel.com">
<link rel="match" href="summary-display-inline-flex-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: inline-flex' makes it a flex container.">
<style>
.flex-container {
  background: #333;
  border: 0px;
  display: inline-flex;
  margin: 0px;
  padding: 0px;
}

.flex-container.flex-direction-row {
  flex-direction : row;
}

.flex-container.flex-direction-row-reverse {
  flex-direction : row-reverse;
}

.flex-container.flex-direction-column {
  flex-direction : column;
}

.flex-container.flex-direction-column-reverse {
  flex-direction : column-reverse;
}

.flex-container.flex-direction-column-reverse {
  flex-direction : column-reverse;
}

.flex-container.justify-content-center {
  justify-content: center;
}

.flex-container.justify-content-space-around {
  justify-content: space-around;
}

.flex-container.justify-content-space-between {
  justify-content: space-between;
}

.flex-item {
  width:50px;
  height:50px;
  margin:20px;
  background: #eee;
  line-height: 50px;
  text-align: center;
}
</style>

<summary style="display: inline-flex;">
  <div>these fields</div>
  <div>shouldn't be</div>
  <div>stacked vertically</div>
</summary>

<h1>flex-direction: row</h1>
<summary class="flex-container flex-direction-row">
  <div class="flex-item">1</div>
  <div class="flex-item">2</div>
  <div class="flex-item">3</div>
</summary>

<h1>flex-direction: row-reverse</h1>
<summary class="flex-container flex-direction-row-reverse">
  <div class="flex-item">1</div>
  <div class="flex-item">2</div>
  <div class="flex-item">3</div>
</summary>

<h1>flex-direction: column</h1>
<summary class="flex-container flex-direction-column">
  <div class="flex-item">1</div>
  <div class="flex-item">2</div>
  <div class="flex-item">3</div>
</summary>

<h1>flex-direction: column-reverse</h1>
<summary class="flex-container flex-direction-column-reverse">
  <div class="flex-item">1</div>
  <div class="flex-item">2</div>
  <div class="flex-item">3</div>
</summary>

<h1>justify-content: center</h1>
<summary class="flex-container justify-content-center">
  <div class="flex-item">1</div>
  <div class="flex-item">2</div>
  <div class="flex-item">3</div>
</summary>

<h1>justify-content: space-around</h1>
<summary class="flex-container justify-content-space-around">
  <div class="flex-item">1</div>
  <div class="flex-item">2</div>
  <div class="flex-item">3</div>
</summary>

<h1>justify-content: space-between</h1>
<summary class="flex-container justify-content-space-between">
  <div class="flex-item">1</div>
  <div class="flex-item">2</div>
  <div class="flex-item">3</div>
</summary>