-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Expand file tree
/
Copy pathposition-absolute-dynamic-relayout-005.html
More file actions
37 lines (34 loc) · 1.13 KB
/
position-absolute-dynamic-relayout-005.html
File metadata and controls
37 lines (34 loc) · 1.13 KB
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
<!DOCTYPE html>
<title>CSS Positioned Test: an absolutely positioned element whose containing block is an inline element resolves its percentage width correctly after revealing itself via content-visibility:visible</title>
<link rel="author" title="Ting-Yu Lin" href="mailto:tlin@mozilla.com">
<link rel="author" title="Mozilla" href="https://www.mozilla.org/">
<link rel="help" href="https://drafts.csswg.org/css-position-3/#absolute-cb">
<link rel="help" href="https://drafts.csswg.org/css-contain-2/#content-visibility">
<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=2042572">
<link rel="match" href="../reference/ref-filled-green-100px-square.xht">
<style>
#absCB {
position: relative;
}
#abs {
position: absolute;
width: 80%;
background: red;
content-visibility: hidden;
}
#green {
width: 100px;
height: 100px;
background: green;
}
</style>
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<span id="absCB">
<div>
<div id="abs"><div id="green"></div></div>
</div>
</span>
<script>
document.documentElement.offsetTop;
abs.style.contentVisibility = "visible";
</script>