diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
commit | 26a029d407be480d791972afb5975cf62c9360a6 (patch) | |
tree | f435a8308119effd964b339f76abb83a57c29483 /testing/web-platform/tests/css/css-layout-api/child-constraints/percentage-size-vrl-htb.https.html | |
parent | Initial commit. (diff) | |
download | firefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz firefox-26a029d407be480d791972afb5975cf62c9360a6.zip |
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/css/css-layout-api/child-constraints/percentage-size-vrl-htb.https.html')
-rw-r--r-- | testing/web-platform/tests/css/css-layout-api/child-constraints/percentage-size-vrl-htb.https.html | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-layout-api/child-constraints/percentage-size-vrl-htb.https.html b/testing/web-platform/tests/css/css-layout-api/child-constraints/percentage-size-vrl-htb.https.html new file mode 100644 index 0000000000..2d3d496fa5 --- /dev/null +++ b/testing/web-platform/tests/css/css-layout-api/child-constraints/percentage-size-vrl-htb.https.html @@ -0,0 +1,58 @@ +<!DOCTYPE html> +<html class=reftest-wait> +<link rel="help" href="https://drafts.css-houdini.org/css-layout-api/#dom-layoutconstraintsoptions-percentageinlinesize"> +<link rel="match" href="../green-square-ref.html"> +<meta name="assert" content="This test checks that setting the percentage inline-size of children works as expected." /> + +<style> +.test { + writing-mode: vertical-rl; + background: red; + height: 100px; +} + +.child { + writing-mode: horizontal-tb; + visibility: hidden; + width: 10px; + + --percentage-inline-size: 20; + + --inline-size-expected: 10px; + --block-size-expected: 10px; +} + +@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"> + <!-- A fixed height shouldn't be affected by the percentage size. --> + <div class="child" style="height: 10px;"></div> + + <!-- A percentage height should resolve itself against the percentageInlineSize. --> + <div class="child" style="height: 50%;"></div> + + <!-- A percentage max-height should resolve itself against the percentageInlineSize. --> + <div class="child" style="height: 15px; max-height: 50%;"></div> + + <!-- A percentage min-height should resolve itself against the percentageInlineSize. --> + <div class="child" style="height: 5px; min-height: 50%;"></div> + + <!-- A replaced percentage height should resolve itself against the percentageInlineSize. --> + <img class="child" style="height: 50%;" /> + + <!-- A replaced percentage max-height should resolve itself against the percentageInlineSize. --> + <img class="child" style="height: 15px; max-height: 50%;" /> + + <!-- A replaced percentage min-height should resolve itself against the percentageInlineSize. --> + <img class="child" style="height: 5px; min-height: 50%;" /> +<script> +importWorkletAndTerminateTestAfterAsyncPaint(CSS.layoutWorklet, {url: 'support/layout-child-sizes-worklet.js'}); +</script> |