https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 3420010fcacabcec00013c156c2082e7252b605b authored by Darren Shen on 10 April 2018, 08:46:40 UTC
[css-typed-om] Fix unsupported values in non-list-valued properties.
Tip revision: 3420010
perform-child-layout-fixed-block-size.https.html
<!DOCTYPE html>
<html class=reftest-wait>
<link rel="help" href="https://drafts.css-houdini.org/css-layout-api/#dom-layoutconstraintsoptions-fixedblocksize">
<link rel="match" href="layout-child-ref.html">
<meta name="assert" content="This test checks that fixing the block size of children works as expected." />

<style>
.test {
  background: red;
  margin: 10px;
  width: 100px;
}

.htb {
  writing-mode: horizontal-tb;
  visibility: hidden;
  width: 3px;
  height: 2px;

  --fixed-block-size: 10;

  --inline-size-expected: 3;
  --block-size-expected: 10;
}

.vrl {
  writing-mode: vertical-rl;
  visibility: hidden;
  width: 3px;
  height: 2px;

  --fixed-block-size: 10;

  --inline-size-expected: 3;
  --block-size-expected: 10;
}

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

<div class="test">
  <div class="htb"></div>
  <div class="vrl"></div>
  <!-- min/max-height should have no effect, fixedBlockSize wins. -->
  <div class="htb" style="max-height: 5px;"></div>
  <div class="vrl" style="max-height: 5px;"></div>
  <div class="htb" style="min-height: 15px;"></div>
  <div class="vrl" style="min-height: 15px;"></div>
</div>

<script>
importWorkletAndTerminateTestAfterAsyncPaint(CSS.layoutWorklet, {url: 'support/layout-child-fixed-sizes-worklet.js'});
</script>
back to top