Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<title>CSS Test: `will-change: z-index`</title>
<link rel="author" title="Oriol Brufau" href="obrufau@igalia.com">
<link rel="match" href="../reference/ref-filled-green-100px-square.xht">
<meta name="assert" content="
`will-change: z-index` establishes a stacking context on a flex item.
">
<style>
.test {
will-change: z-index;
width: 100px;
background: red;
}
.test::before {
content: "";
display: block;
position: relative;
z-index: -1;
height: 100px;
background: green;
}
</style>
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div style="display: flex">
<div class="test"></div>
</div>