mirror of
https://github.com/servo/servo.git
synced 2025-06-27 02:23:41 +01:00
30 lines
723 B
HTML
30 lines
723 B
HTML
<!doctype html>
|
|
<title>CSS Container Queries Test: ::backdrop disappearing conditionally on dialog container</title>
|
|
<link rel="help" href="https://drafts.csswg.org/css-contain-3/#container-queries">
|
|
<link rel="match" href="top-layer-dialog-backdrop-ref.html">
|
|
<style>
|
|
html {
|
|
/* Prevent multiple layout passes due to scrollbars */
|
|
overflow: hidden;
|
|
background: green;
|
|
}
|
|
dialog {
|
|
container-type: size;
|
|
width: 100px;
|
|
height: 100px;
|
|
visibility: hidden;
|
|
}
|
|
dialog::backdrop {
|
|
display: block;
|
|
background-color: red;
|
|
}
|
|
@container (width > 1px) {
|
|
dialog::backdrop {
|
|
display: none;
|
|
}
|
|
}
|
|
</style>
|
|
<dialog id="dialog"></dialog>
|
|
<script>
|
|
dialog.showModal();
|
|
</script>
|