summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-overflow/overflow-inline-transform-relative.html
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/css/css-overflow/overflow-inline-transform-relative.html')
-rw-r--r--testing/web-platform/tests/css/css-overflow/overflow-inline-transform-relative.html39
1 files changed, 39 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-overflow/overflow-inline-transform-relative.html b/testing/web-platform/tests/css/css-overflow/overflow-inline-transform-relative.html
new file mode 100644
index 0000000000..4df7b63894
--- /dev/null
+++ b/testing/web-platform/tests/css/css-overflow/overflow-inline-transform-relative.html
@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<title>CSS Overflow and Transforms: css-overflow-3</title>
+<link rel="author" title="mailto:atotic@google.com">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<link rel="help" href="https://www.w3.org/TR/css-overflow-3/#scrollable">
+<meta name="assert" content="css transform is used to compute scroll overflow of inline-block children">
+<style>
+ #container {
+ border: 1px solid black;
+ width: 200px;
+ overflow: auto;
+ }
+ #target {
+ display: inline-block;
+ width: 20px;
+ height: 20px;
+ background: green;
+ position: relative;
+ top: 100px;
+ transform: translateY(80px);
+ }
+</style>
+<!--
+ #container should have vertical scrollbar because target is offset
+ by position:relative and transform.
+-->
+<div id="container">
+ <span>
+ scroll
+ <div id="target"></div>
+ down
+ </span>
+</div>
+<script>
+ test(() => {
+ assert_equals(document.querySelector("#container").scrollHeight, 200);
+ }, '#target used transform when computing scroll overflow');
+</script>