summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-flexbox/cross-axis-scrollbar.html
blob: 6bb325175562a231af8177e8d12f0bc35ac187a6 (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
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
<!DOCTYPE html>
<html>
<title>CSS Flexbox: Scrollbars and flex-direction.</title>
<link href="support/flexbox.css" rel="stylesheet">
<link rel="help" href="https://www.w3.org/TR/css-flexbox-1/#flex-direction-property">
<link rel="help" href="https://www.w3.org/TR/css-overflow-4/#classic-scrollbars">
<link rel="match" href="reference/cross-axis-scrollbar-ref.html">
<meta name="assert" content="This test ensures that flexbox scrollbars take flex-direction into account."/>
<style>
body {
    margin: 0;
}

.flexbox {
    background-color: red;
}

.vertical-rl {
    writing-mode: vertical-rl;
}

.vertical-lr {
    writing-mode: vertical-lr;
}

.column > div {
    flex: none;
    background-color: green;
    width: 100px;
    height: 10px;
}

.row > div {
    background-color: green;
    flex: 1;
    height: 50px;
    min-height: 0;
}

.vertical-lr > .column > div {
    flex: none;
    height: 50px;
    width: 20px;
}

.vertical-lr > .row > div {
    flex: 1;
    width: 100px;
}

</style>
<body>

This test passes if no red is showing.

<div style="position: relative;">

<div style="position: absolute; top: 0; left: 0;">
<div class="flexbox column" style="overflow-x: scroll; overflow-y: hidden; border-bottom: 10px solid green;">
    <div class="align-self-flex-start"></div>
    <div class="align-self-center"></div>
    <div class="align-self-flex-end"></div>
    <div class="align-self-baseline"></div>
    <div class="align-self-stretch"></div>
</div>
</div>

<div style="position: absolute; top: 0; left: 150px;">
<div class="flexbox column" style="overflow-y: scroll; overflow-x: hidden; border-right: 10px solid green;">
    <div class="align-self-flex-start"></div>
    <div class="align-self-center"></div>
    <div class="align-self-flex-end"></div>
    <div class="align-self-baseline"></div>
    <div class="align-self-stretch"></div>
</div>
</div>

<div style="position: absolute; top:0; left: 300px" class="vertical-lr">
<div class="flexbox column" style="overflow-y: scroll; overflow-x: hidden; border-right: 10px solid green;">
    <div class="align-self-flex-start"></div>
    <div class="align-self-center"></div>
    <div class="align-self-flex-end"></div>
    <div class="align-self-baseline"></div>
    <div class="align-self-flex-start"></div>
</div>
</div>

<div style="position: absolute; top:0; left: 450px;" class="vertical-lr">
<div class="flexbox column" style="overflow-x: scroll; overflow-y: hidden; border-bottom: 10px solid green;">
    <div class="align-self-flex-start"></div>
    <div class="align-self-center"></div>
    <div class="align-self-flex-end"></div>
    <div class="align-self-baseline"></div>
    <div class="align-self-flex-start"></div>
</div>
</div>

<div style="height: 20px; width: 100px; position: absolute; top: 100px; left: 0">
<div class="flexbox row" style="overflow-x: scroll; overflow-y: hidden; border-bottom: 10px solid green;">
    <div class="align-self-flex-start"></div>
    <div class="align-self-center"></div>
    <div class="align-self-flex-end"></div>
    <div class="align-self-baseline"></div>
    <div class="align-self-stretch"></div>
</div>
</div>

<div style="height: 20px; width: 100px; position: absolute; top: 100px; left: 150px">
<div class="flexbox row" style="overflow-y: scroll; overflow-x: hidden; border-right: 10px solid green;">
    <div class="align-self-flex-start"></div>
    <div class="align-self-center"></div>
    <div class="align-self-flex-end"></div>
    <div class="align-self-baseline"></div>
    <div class="align-self-stretch"></div>
</div>
</div>

<div style="height: 50px; width: 50px; position: absolute; top: 100px; left: 300px" class="vertical-lr">
<div class="flexbox row" style="overflow-x: scroll; overflow-y: hidden; border-bottom: 10px solid green;">
    <div class="align-self-flex-start"></div>
    <div class="align-self-center"></div>
    <div class="align-self-flex-end"></div>
    <div class="align-self-baseline"></div>
    <div class="align-self-stretch"></div>
</div>
</div>

<div style="height: 50px; width: 50px; position: absolute; top: 100px; left: 450px" class="vertical-lr">
<div class="flexbox row" style="overflow-y: scroll; overflow-x: hidden; border-right: 10px solid green;">
    <div class="align-self-flex-start"></div>
    <div class="align-self-center"></div>
    <div class="align-self-flex-end"></div>
    <div class="align-self-baseline"></div>
    <div class="align-self-stretch"></div>
</div>
</div>

</div>
<!-- FIXME: Add tests for vertical-rl.  Setting the logical
bottom border on these tests cause additional scrollbars to appear. -->

</body>
</html>