wpt / css / css-viewport / zoom / container-queries-inline-size.html

Status: PASS | Duration: 7ms | Subtests: 1/1 | Open test on wpt.live | Open ref on wpt.live | wpt.fyi

/css/css-viewport/zoom/container-queries-inline-size.html

<!doctype html>
<link rel="help" href="https://drafts.csswg.org/css-viewport/">
<link rel="match" href="reference/container-queries-inline-size-ref.html">
<style>
  .container {
    container-type: inline-size;
    width: 200px;
    height: 100px;
    writing-mode: vertical-lr;
  }
  .child {
    background-color: green;
    height: 50px;
    width: 50px;
    @container (inline-size > 120px) {
      background-color: red;
    }
  }
</style>
<p>All boxes below should be green.</p>
<div class="container">
  <div class="child"></div>
</div>
<div class="container" style="zoom: 2">
  <div class="child"></div>
</div>
<div class="container" style="zoom: 2">
  <div class="nested" style="zoom: 2">
    <div class="child"></div>
  </div>
</div>
<div class="outer" style="zoom: 2">
  <div class="container">
    <div class="child"></div>
  </div>
</div>

/css/css-viewport/zoom/reference/container-queries-inline-size-ref.html

<!doctype html>
<link rel="help" href="https://drafts.csswg.org/css-viewport/">
<style>
  .container {
    container-type: inline-size;
    width: 100px;
    height: 100px;
    writing-mode: vertical-lr;
  }
  .child {
    background-color: green;
    height: 50px;
    width: 50px;
}
</style>
<p>All boxes below should be green.</p>
<div class="container">
  <div class="child"></div>
</div>
<div class="container" style="zoom: 2">
  <div class="child"></div>
</div>
<div class="container" style="zoom: 2">
  <div class="nested" style="zoom: 2">
    <div class="child"></div>
  </div>
</div>
<div class="outer" style="zoom: 2">
  <div class="container">
    <div class="child"></div>
  </div>
</div>