Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-conditional/container-queries/crashtests/svg-resource-in-container-crash.html - WPT Dashboard Interop Dashboard
<!doctype html>
<title>@container with SVG resource shouldn't crash</title>
<style>
.cq {
container-name: cq;
container-type: inline-size;
}
@container cq (min-width: 1px) {
.cq {
border: 2px solid blue;
}
}
</style>
<div class="cq">
<svg>
<clipPath id="c">
<rect width="100" height="100"/>
</clipPath>
<rect width="200" height="200" clip-path="url(#c)"/>
</svg>
</div>
<script>
document.body.offsetTop;
document.querySelector('.cq > svg').style.width = "100%";
</script>