https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 1b5ce4ad3817e7b7247d7ff0f76b81877fce0d89 authored by Andrew Comminos on 21 December 2018, 21:45:26 UTC
Perform flexbox child hit testing by testing all children atomically
Tip revision: 1b5ce4a
constraints-fixed-block-size-grid-stretch-max.https.html
<!DOCTYPE html>
<html class=reftest-wait>
<link rel="help" href="https://drafts.css-houdini.org/css-layout-api/#dom-layoutconstraints-fixedblocksize">
<link rel="match" href="green-square-ref.html">
<meta name="assert" content="This test checks that LayoutConstraints#fixedBlockSize is passed into the layout function correctly." />
<style>
body {
  display: grid;
  grid: 50px / auto-flow;
}

.test {
  background: red;
  --expected-block-size: 30; /* grid-item should respect the max constraint */
  max-height: 30px;
  width: 100px;
  margin-bottom: 10px;
}

.child {
  background: green;
}

@supports (display: layout(test)) {
  .test {
    display: layout(test);
  }
}
</style>
<script src="/common/reftest-wait.js"></script>
<script src="/common/worklet-reftest.js"></script>

<div class="test">
  <div class="child"></div>
</div>

<script>
importWorkletAndTerminateTestAfterAsyncPaint(CSS.layoutWorklet, {url: 'support/constraints-fixed-block-size.js'});
</script>
back to top