https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 819c6538af2b748521647d2c85008ef389aaf7fc authored by Darren Shen on 09 April 2018, 02:10:49 UTC
[css-typed-om] Implement support for text-* properties.
Tip revision: 819c653
perform-child-layout-fixed-inline-size.https.html
<!DOCTYPE html>
<html class=reftest-wait>
<link rel="help" href="https://drafts.css-houdini.org/css-layout-api/#dom-layoutconstraintsoptions-fixedinlinesize">
<link rel="match" href="layout-child-ref.html">
<meta name="assert" content="This test checks that fixing the inline 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-inline-size: 10;

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

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

  --fixed-inline-size: 10;

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

@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-width should have no effect, fixedInlineSize wins. -->
  <div class="htb" style="max-width: 5px;"></div>
  <div class="vrl" style="max-width: 5px;"></div>
  <div class="htb" style="min-width: 15px;"></div>
  <div class="vrl" style="min-width: 15px;"></div>
</div>

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