Files
sousa-gecko/testing/web-platform/tests/css/css-sizing/stretch/flex-line-002.html
T
David Grogan 5b74047810 Bug 1970019 [wpt PR 52919] - [stretch] Add more flex tests, a=testonly
Automatic update from web-platform-tests
[stretch] Add more flex tests

These tests stem from https://github.com/w3c/csswg-drafts/issues/11784

They test scenarios when the size:stretch should stretch to the flex
line vs the flex container.

Bug: 41253915
Change-Id: I2e5fcfa73ace2516b88e149349c3316a3e003126
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6598916
Commit-Queue: David Grogan <dgrogan@chromium.org>
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1468432}

--

wpt-commits: bc4e61c278fcb26c5ccc074669aff8bf421ec823
wpt-pr: 52919
2025-06-19 08:13:41 +00:00

49 lines
1.5 KiB
HTML

<!DOCTYPE html>
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/11784">
<script src='/resources/testharness.js'></script>
<script src='/resources/testharnessreport.js'></script>
<script src="/resources/check-layout-th.js"></script>
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
<meta name="assert"
content="An item's cross-size:stretch should stretch to the line size, not the container size; container has indefinite height">
<style>
.container {
/* inline just so they don't overflow on each other */
display: inline-flex;
width: 100px;
border: solid;
flex-wrap: wrap;
/* Prevent the lines from stretching. */
align-content: start;
font: 20px/1 Ahem;
}
.container>div {
border: 3px solid;
}
.stretch {
height: -moz-available;
height: -webkit-fill-available;
height: stretch;
}
</style>
<div class="container">
<div class="stretch" style="width: 75px; border-color: cyan"
data-expected-height="26">a</div>
<div class="stretch" style="width: 75px; border-color: magenta"
data-expected-height="26">b</div>
</div>
<div class="container">
<div class="stretch" style="width: 75px; border-color: cyan"
data-expected-height="156">a</div>
<div style="border-color: orange; height: 150px"></div>
<div class="stretch" style="width: 75px; border-color: magenta"
data-expected-height="26">b</div>
</div>
<script>
document.fonts.ready.then(() => checkLayout(".stretch"));
</script>