wpt / css / css-contain / contain-size-removed.html

Status: PASS | Duration: 8ms | Subtests: 1/1 | Open test on wpt.live | Open ref on wpt.live | wpt.fyi

/css/css-contain/contain-size-removed.html

<!DOCTYPE html>
<html>
<meta charset="utf-8">
<title>CSS Containment Test: Remove size from style.contain</title>
<link rel="help" href="https://drafts.csswg.org/css-contain/#contain-property">
<meta name="assert" content="After removing size from style.contain, the element should trigger layout">
<link rel="match" href="reference/pass_if_pass_below_clipped.html">
<style>

</style>
<p>Test passes if there is the word "PASS" below.</p>
<div id="container" style="contain: size; overflow: hidden;"><span>PASS</span></div>

<script>
window.requestAnimationFrame(() => {
    document.getElementById("container").style.contain = "";
});
</script>

/css/css-contain/reference/pass_if_pass_below_clipped.html

<!doctype html>
<html>
<head>
   <title>Reference rendering - passes if there is the word "PASS" below</title>
<style>
div { overflow: hidden; }
</style>
</head>
<body>
   <p>Test passes if there is the word "PASS" below.</p>
   <div>PASS</div>
</body>
</html>