diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:22:09 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:22:09 +0000 |
commit | 43a97878ce14b72f0981164f87f2e35e14151312 (patch) | |
tree | 620249daf56c0258faa40cbdcf9cfba06de2a846 /testing/web-platform/tests/css/css-flexbox/stretched-child-shrink-on-relayout.html | |
parent | Initial commit. (diff) | |
download | firefox-43a97878ce14b72f0981164f87f2e35e14151312.tar.xz firefox-43a97878ce14b72f0981164f87f2e35e14151312.zip |
Adding upstream version 110.0.1.upstream/110.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/css/css-flexbox/stretched-child-shrink-on-relayout.html')
-rw-r--r-- | testing/web-platform/tests/css/css-flexbox/stretched-child-shrink-on-relayout.html | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-flexbox/stretched-child-shrink-on-relayout.html b/testing/web-platform/tests/css/css-flexbox/stretched-child-shrink-on-relayout.html new file mode 100644 index 0000000000..b427d7f01a --- /dev/null +++ b/testing/web-platform/tests/css/css-flexbox/stretched-child-shrink-on-relayout.html @@ -0,0 +1,77 @@ +<!DOCTYPE html> +<title>CSS Flexbox: Shrink stretched child on relayout</title> +<link rel="help" href="https://drafts.csswg.org/css-flexbox/#flex-property"> +<link rel="help" href="https://drafts.csswg.org/css-flexbox/#flex-flow-property"> +<meta name="assert" content="This ensures that flexbox shrinks stretched children after removing a sibling, in various writing-modes and flows."> +<style> +.flexbox { + display: flex; + background: papayawhip; + border: 1px solid midnightblue; + margin: 1em; + width: 50px; +} + +.flexbox > div { + margin: 5px; + min-width: 10px; + min-height: 10px; + background-color: lawngreen; +} + +.column { + flex-flow: column; +} + +.horizontal-tb { + writing-mode: horizontal-tb; +} +.vertical-lr { + writing-mode: vertical-lr; +} + +.largeitem { + height: 200px; + width: 200px; + margin: 5px; +} +</style> +</head> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> +<body onload="checkLayout('.flexbox')"> +<div id=log></div> + +<div class="flexbox"> + <div data-expected-height=10 data-expected-width=10></div> + <div class="largeitem"></div> +</div> +<div class="flexbox column"> + <div data-expected-height=10 data-expected-width=40></div> + <div class="largeitem"></div> +</div> + +<div class="flexbox"> + <div class="horizontal-tb" data-expected-height=10 data-expected-width=10></div> + <div class="largeitem"></div> +</div> +<div class="flexbox column"> + <div class="horizontal-tb" data-expected-height=10 data-expected-width=40></div> + <div class="largeitem"></div> +</div> +<div class="flexbox"> + <div class="vertical-lr" data-expected-height=10 data-expected-width=10></div> + <div class="largeitem"></div> +</div> +<div class="flexbox column"> + <div class="vertical-lr" data-expected-height=10 data-expected-width=40></div> + <div class="largeitem"></div> +</div> +<script> +document.body.offsetTop; +var targets = document.getElementsByClassName('largeitem'); +for (var i = targets.length - 1; i >= 0; i--) { + targets[i].remove(); +}; +</script> |