1
0
Fork 0
firefox/testing/web-platform/tests/css/css-contain/contain-paint-stacking-context-001a.html
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

32 lines
945 B
HTML

<!DOCTYPE HTML>
<title>'contain: paint' establishes stacking context.</title>
<link rel="author" title="Psychpsyo" href="mailto:psychpsyo@gmail.com">
<link rel="help" href="https://drafts.csswg.org/css2/visuren.html#x43">
<link rel="help" href="https://drafts.csswg.org/css-contain/#containment-paint">
<link rel="match" href="contain-paint-stacking-context-001-ref.html">
<style>
div {
width: 100px;
height: 100px;
}
#front {
background-color: green;
/* makes a stacking context and puts this on top */
position: absolute;
z-index: 10;
}
#back {
contain: paint;
}
#notOnTop {
background-color: red;
/* z-index is higher than on #front, but this should still be covered up because it is inside #back, which has 'contain: paint' */
position: absolute;
z-index: 1000;
}
</style>
<div id="front"></div>
<div id="back">
<div id="notOnTop"></div>
</div>
Test succeeds if there is no red.