blob: df1128316f6010f010e6d27c395d7751fa05d7b1 (
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
|
<!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 abspos children">
<style>
#container {
position: relative;
overflow: auto;
width: 200px;
height: 200px;
}
#target {
position: absolute;
width: 150px;
height: 150px;
margin-left: 100px;
transform: translateX(-100px);
background: green;
}
</style>
<!-- There should be no scrollbars on this page -->
<div id="container">
<div id="target"></div>
</div>
<script>
test(() => {
assert_equals(document.querySelector("#container").scrollWidth, 200);
}, '#target used transform when computing scroll overflow');
</script>
|