summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-flexbox/cross-axis-scrollbar.html
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/css/css-flexbox/cross-axis-scrollbar.html')
-rw-r--r--testing/web-platform/tests/css/css-flexbox/cross-axis-scrollbar.html143
1 files changed, 143 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-flexbox/cross-axis-scrollbar.html b/testing/web-platform/tests/css/css-flexbox/cross-axis-scrollbar.html
new file mode 100644
index 0000000000..6bb3251755
--- /dev/null
+++ b/testing/web-platform/tests/css/css-flexbox/cross-axis-scrollbar.html
@@ -0,0 +1,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>