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/top-layer-crash.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<iframe width="800" srcdoc='<!DOCTYPE html>
<style>
.wrapper {
container: example / inline-size;
position: fixed;
width: 100%;
}
.inner {
display: none;
}
@container (min-width: 600px) {
.inner {
display: block;
}
}
</style>
<div class="wrapper">
<div class="inner">
<dialog></dialog>
</div>
</div>
<script>
document.querySelector("dialog").showModal()
</script>'>
</iframe>
<script>
window.onload = () => document.querySelector("iframe").width = 400;
</script>