summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-contain/container-queries/top-layer-dialog-backdrop.html
blob: 25635167a54ce461a221e2c649c48fc897245581 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<!doctype html>
<title>CSS Container Queries Test: ::backdrop depending on @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 { background: green; }
  #container { container-type: inline-size; }
  @container (max-width: 200px) {
    ::backdrop { display: none; }
    #dialog { visibility: hidden; }
  }
</style>
<div id="container">
  <dialog id="dialog"></dialog>
</div>
<script>
  dialog.showModal();
  dialog.offsetTop;
  container.style.width = "100px";
</script>