-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Expand file tree
/
Copy pathcontent-visibility-042.html
More file actions
38 lines (34 loc) · 988 Bytes
/
content-visibility-042.html
File metadata and controls
38 lines (34 loc) · 988 Bytes
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
<!doctype HTML>
<html class="reftest-wait">
<meta charset="utf8">
<title>Content Visibility: pseudo elements</title>
<link rel="author" title="Rakina Zata Amni" href="mailto:rakina@chromium.org">
<link rel="help" href="https://un5n798jx6qx6j0rmf2verhh.julianrbryant.com/css-contain/#content-visibility">
<link rel="match" href="content-visibility-042-ref.html">
<meta name="assert" content="content-visibility elements paints ::before and ::after when hidden is removed">
<script src="/common/reftest-wait.js"></script>
<style>
#container::before {
content: "This test ";
color: green;
}
.hasAfter::after {
content: "PASSES.";
background: green;
color: white;
}
.hidden {
content-visibility: hidden;
}
</style>
<div id="container" class=hidden style="display:none;"></div>
<script>
async function runTest() {
container.classList.add("hasAfter");
container.classList.remove("hidden");
container.style = "";
requestAnimationFrame(takeScreenshot);
}
window.onload = runTest;
</script>
</html>