summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-layout-api/constraints/fixed-block-size-flex-stretch.https.html
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/css/css-layout-api/constraints/fixed-block-size-flex-stretch.https.html')
-rw-r--r--testing/web-platform/tests/css/css-layout-api/constraints/fixed-block-size-flex-stretch.https.html38
1 files changed, 38 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-layout-api/constraints/fixed-block-size-flex-stretch.https.html b/testing/web-platform/tests/css/css-layout-api/constraints/fixed-block-size-flex-stretch.https.html
new file mode 100644
index 0000000000..cfaf38295f
--- /dev/null
+++ b/testing/web-platform/tests/css/css-layout-api/constraints/fixed-block-size-flex-stretch.https.html
@@ -0,0 +1,38 @@
+<!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: flex;
+ height: 50px;
+}
+
+.test {
+ background: red;
+ --expected-block-size: 40; /* flex-item should stretch to (50 - 10)px */
+ 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>