summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-flexbox/scrollbars.html
blob: 0eca05bfc63f9522e6d624c35469ba69e7410968 (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
<!DOCTYPE html>
<head>
<title>Scrollbars inside flexbox with direction and writing-mode</title>
<link rel="author" title="Google, Inc." href="http://www.google.com/">
<link rel="match" href="scrollbars-ref.html">
<link rel="help" href="https://drafts.csswg.org/css-flexbox/">

<script src="support/scrollbars.js"></script>

<style>
.horizontal-header {
  width: 120px;
}
.vertical-header {
  width: 60px;
}
.container-row {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: flex-start;
}
.container {
  flex: none;
  margin: 5px;
}
.ltr {
  direction: ltr;
}
.rtl {
  direction: rtl;
}
.horizontal {
  writing-mode: horizontal-tb;
}
.flipped-blocks {
  writing-mode: vertical-rl;
}
.flipped-lines {
  writing-mode: vertical-lr;
}
.flex {
  border: 2px solid red;
  display: flex;
  overflow: scroll;
  max-width: 100px;
  max-height: 100px;
}
.column {
  flex-direction: column;
}
.column-reverse {
  flex-direction: column-reverse;
}
.row {
  flex-direction: row;
}
.row-reverse {
  flex-direction: row-reverse;
}
.flex > .leaf1, .flex > .leaf2, .flex > .leaf3 {
  flex: none;
  width: 30px;
  height: 30px;
  border: 2px solid blue;
  margin: 3px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.flex > div > div {
  font-size: 20px;
  text-align: center;
  flex: none;
}
</style>

</head>

<div class="container-row">
  <div class="vertical-header ltr horizontal"></div>
  <div class="horizontal-header ltr horizontal">ltr<br>horizontal-tb</div>
  <div class="vertical-header ltr flipped-blocks">ltr<br>vertical-rl</div>
  <div class="vertical-header ltr flipped-blocks">ltr<br>vertical-lr</div>
  <div class="horizontal-header rtl horizontal">rtl<br>horizontal-tb</div>
  <div class="vertical-header rtl flipped-blocks">rtl<br>vertical-rl</div>
  <div class="vertical-header rtl flipped-blocks">rtl<br>vertical-lr</div>
</div>

<script>
flexDirections.forEach((flexDirection) => {
  var containerRow = createContainerRow(flexDirection);
  document.body.appendChild(containerRow);
});
</script>