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-layout-root-crash.html - WPT Dashboard Interop Dashboard
<!doctype html>
<title>@container changing display of SVG element should not crash</title>
<iframe id="frame" style="width: 200px"></iframe>
<script>
frame.srcdoc = `
<style>
#container {
container-type: inline-size;
}
@container (min-width: 300px) {
.hide { display: none; }
}
</style>
<div id="container">
<div class="hide"><svg></svg></div>
</div>`;
requestAnimationFrame(() =>
requestAnimationFrame(() =>
requestAnimationFrame(() => frame.style.width = "400px")));
</script>