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-flexbox/alignment | |
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-flexbox/alignment')
29 files changed, 2991 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-001.html b/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-001.html new file mode 100644 index 0000000000..9c5e3858cf --- /dev/null +++ b/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-001.html @@ -0,0 +1,68 @@ +<!DOCTYPE html> +<link rel="help" href="https://drafts.csswg.org/css-align-3/#baseline-rules"> +<link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#cross-alignment"> +<style> +#target { + display: flex; + flex-direction: column; + align-items: last baseline; + width: 200px; + border: solid 3px; + position: relative; +} +#target > :nth-child(1) { + background: lime; + margin-right: 20px; + padding-right: 20px; + font-size: 20px; + line-height: 20px; + align-self: first baseline; + writing-mode: vertical-rl; +} +#target > :nth-child(2) { + background: hotpink; + font-size: 30px; + line-height: 30px; + writing-mode: vertical-lr; +} +#target > :nth-child(3) { + background: papayawhip; + font-size: 16px; + line-height: 16px; + writing-mode: vertical-lr; +} +#target > :nth-child(4) { + background: orange; + margin-left: 20px; + padding-left: 20px; + font-size: 20px; + line-height: 20px; + align-self: first baseline; + writing-mode: vertical-lr; +} +#target > :nth-child(5) { + background: cyan; + font-size: 30px; + line-height: 30px; + writing-mode: vertical-rl; +} +#target > :nth-child(6) { + background: papayawhip; + font-size: 16px; + line-height: 16px; + writing-mode: vertical-rl; +} +</style> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> +<body onload="checkLayout('#target > div')"> + +<div id="target"> + <div data-offset-x="120">line1<br>line2</div> + <div data-offset-x="105">line1<br>line2</div> + <div data-offset-x="126">line1<br>line2</div> + <div data-offset-x="20">line1<br>line2</div> + <div data-offset-x="35">line1<br>line2</div> + <div data-offset-x="42">line1<br>line2</div> +</div> diff --git a/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-002.html b/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-002.html new file mode 100644 index 0000000000..41a8319ae0 --- /dev/null +++ b/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-002.html @@ -0,0 +1,68 @@ +<!DOCTYPE html> +<link rel="help" href="https://drafts.csswg.org/css-align-3/#baseline-rules"> +<link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#cross-alignment"> +<style> +#target { + display: flex; + align-items: last baseline; + width: 200px; + border: solid 3px; + position: relative; + writing-mode: vertical-lr; +} +#target > :nth-child(1) { + background: lime; + margin-right: 20px; + padding-right: 20px; + font-size: 20px; + line-height: 20px; + align-self: first baseline; + writing-mode: vertical-rl; +} +#target > :nth-child(2) { + background: hotpink; + font-size: 30px; + line-height: 30px; + writing-mode: vertical-lr; +} +#target > :nth-child(3) { + background: papayawhip; + font-size: 16px; + line-height: 16px; + writing-mode: vertical-lr; +} +#target > :nth-child(4) { + background: orange; + margin-left: 20px; + padding-left: 20px; + font-size: 20px; + line-height: 20px; + align-self: first baseline; + writing-mode: vertical-lr; +} +#target > :nth-child(5) { + background: cyan; + font-size: 30px; + line-height: 30px; + writing-mode: vertical-rl; +} +#target > :nth-child(6) { + background: papayawhip; + font-size: 16px; + line-height: 16px; + writing-mode: vertical-rl; +} +</style> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> +<body onload="checkLayout('#target > div')"> + +<div id="target"> + <div data-offset-x="120">line1<br>line2</div> + <div data-offset-x="105">line1<br>line2</div> + <div data-offset-x="126">line1<br>line2</div> + <div data-offset-x="20">line1<br>line2</div> + <div data-offset-x="35">line1<br>line2</div> + <div data-offset-x="42">line1<br>line2</div> +</div> diff --git a/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-003.html b/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-003.html new file mode 100644 index 0000000000..e8be20c9cf --- /dev/null +++ b/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-003.html @@ -0,0 +1,68 @@ +<!DOCTYPE html> +<link rel="help" href="https://drafts.csswg.org/css-align-3/#baseline-rules"> +<link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#cross-alignment"> +<style> +#target { + display: flex; + align-items: last baseline; + width: 200px; + border: solid 3px; + position: relative; + writing-mode: vertical-rl; +} +#target > :nth-child(1) { + background: lime; + margin-right: 20px; + padding-right: 20px; + font-size: 20px; + line-height: 20px; + align-self: first baseline; + writing-mode: vertical-rl; +} +#target > :nth-child(2) { + background: hotpink; + font-size: 30px; + line-height: 30px; + writing-mode: vertical-lr; +} +#target > :nth-child(3) { + background: papayawhip; + font-size: 16px; + line-height: 16px; + writing-mode: vertical-lr; +} +#target > :nth-child(4) { + background: orange; + margin-left: 20px; + padding-left: 20px; + font-size: 20px; + line-height: 20px; + align-self: first baseline; + writing-mode: vertical-lr; +} +#target > :nth-child(5) { + background: cyan; + font-size: 30px; + line-height: 30px; + writing-mode: vertical-rl; +} +#target > :nth-child(6) { + background: papayawhip; + font-size: 16px; + line-height: 16px; + writing-mode: vertical-rl; +} +</style> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> +<body onload="checkLayout('#target > div')"> + +<div id="target"> + <div data-offset-x="120">line1<br>line2</div> + <div data-offset-x="105">line1<br>line2</div> + <div data-offset-x="126">line1<br>line2</div> + <div data-offset-x="20">line1<br>line2</div> + <div data-offset-x="35">line1<br>line2</div> + <div data-offset-x="42">line1<br>line2</div> +</div> diff --git a/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-004.html b/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-004.html new file mode 100644 index 0000000000..cccf504784 --- /dev/null +++ b/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-004.html @@ -0,0 +1,69 @@ +<!DOCTYPE html> +<link rel="help" href="https://drafts.csswg.org/css-align-3/#baseline-rules"> +<link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#cross-alignment"> +<style> +#target { + display: flex; + flex-wrap: wrap-reverse; + flex-direction: column; + align-items: last baseline; + width: 200px; + border: solid 3px; + position: relative; +} +#target > :nth-child(1) { + background: lime; + margin-right: 20px; + padding-right: 20px; + font-size: 20px; + line-height: 20px; + align-self: first baseline; + writing-mode: vertical-rl; +} +#target > :nth-child(2) { + background: hotpink; + font-size: 30px; + line-height: 30px; + writing-mode: vertical-lr; +} +#target > :nth-child(3) { + background: papayawhip; + font-size: 16px; + line-height: 16px; + writing-mode: vertical-lr; +} +#target > :nth-child(4) { + background: orange; + margin-left: 20px; + padding-left: 20px; + font-size: 20px; + line-height: 20px; + align-self: first baseline; + writing-mode: vertical-lr; +} +#target > :nth-child(5) { + background: cyan; + font-size: 30px; + line-height: 30px; + writing-mode: vertical-rl; +} +#target > :nth-child(6) { + background: papayawhip; + font-size: 16px; + line-height: 16px; + writing-mode: vertical-rl; +} +</style> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> +<body onload="checkLayout('#target > div')"> + +<div id="target"> + <div data-offset-x="15">line1<br>line2</div> + <div data-offset-x="0">line1<br>line2</div> + <div data-offset-x="21">line1<br>line2</div> + <div data-offset-x="125">line1<br>line2</div> + <div data-offset-x="140">line1<br>line2</div> + <div data-offset-x="147">line1<br>line2</div> +</div> diff --git a/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-005.html b/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-005.html new file mode 100644 index 0000000000..187083c0b8 --- /dev/null +++ b/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-005.html @@ -0,0 +1,48 @@ +<!DOCTYPE html> +<link rel="help" href="https://drafts.csswg.org/css-align-3/#baseline-rules"> +<link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#cross-alignment"> +<style> +#target { + display: flex; + align-items: last baseline; + width: 200px; + border: solid 3px; + position: relative; + line-height: 0; +} +span { + display: inline-block; + width: 1em; + height: 1em; + outline: solid cornflowerblue 3px; + outline-offset: -3px; +} +#target > div { + flex: none; +} +#target > :nth-child(1) { + background: lime; + margin-bottom: 20px; + padding-bottom: 20px; + font-size: 20px; +} +#target > :nth-child(2) { + background: hotpink; + font-size: 30px; +} +#target > :nth-child(3) { + background: papayawhip; + font-size: 10px; + writing-mode: vertical-lr; +} +</style> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> +<body onload="checkLayout('#target > div')"> + +<div id="target"> + <div data-offset-y="20"><span></span><br><span></span></div> + <div data-offset-y="0"><span></span><br><span></span></div> + <div data-offset-y="50"><span></span><br><span></span></div> +</div> diff --git a/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-006.html b/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-006.html new file mode 100644 index 0000000000..6d52ab783d --- /dev/null +++ b/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-006.html @@ -0,0 +1,52 @@ +<!DOCTYPE html> +<link rel="help" href="https://drafts.csswg.org/css-align-3/#baseline-rules"> +<link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#cross-alignment"> +<style> +#target { + display: flex; + flex-direction: column; + height: 100px; + align-items: last baseline; + width: 200px; + border: solid 3px; + position: relative; + line-height: 0; + writing-mode: vertical-rl; +} +span { + display: inline-block; + width: 1em; + height: 1em; + outline: solid cornflowerblue 3px; + outline-offset: -3px; +} +#target > div { + flex: none; +} +#target > :nth-child(1) { + background: lime; + margin-bottom: 20px; + padding-bottom: 20px; + font-size: 20px; + writing-mode: horizontal-tb; +} +#target > :nth-child(2) { + background: hotpink; + font-size: 30px; + writing-mode: horizontal-tb; +} +#target > :nth-child(3) { + background: papayawhip; + font-size: 10px; +} +</style> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> +<body onload="checkLayout('#target > div')"> + +<div id="target"> + <div data-offset-y="20"><span></span><br><span></span></div> + <div data-offset-y="0"><span></span><br><span></span></div> + <div data-offset-y="55"><span></span><br><span></span></div> +</div> diff --git a/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-007.html b/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-007.html new file mode 100644 index 0000000000..e4c03ed688 --- /dev/null +++ b/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-007.html @@ -0,0 +1,52 @@ +<!DOCTYPE html> +<link rel="help" href="https://drafts.csswg.org/css-align-3/#baseline-rules"> +<link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#cross-alignment"> +<style> +#target { + display: flex; + flex-direction: column; + height: 100px; + align-items: last baseline; + width: 200px; + border: solid 3px; + position: relative; + line-height: 0; + writing-mode: vertical-lr; +} +span { + display: inline-block; + width: 1em; + height: 1em; + outline: solid cornflowerblue 3px; + outline-offset: -3px; +} +#target > div { + flex: none; +} +#target > :nth-child(1) { + background: lime; + margin-bottom: 20px; + padding-bottom: 20px; + font-size: 20px; + writing-mode: horizontal-tb; +} +#target > :nth-child(2) { + background: hotpink; + font-size: 30px; + writing-mode: horizontal-tb; +} +#target > :nth-child(3) { + background: papayawhip; + font-size: 10px; +} +</style> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> +<body onload="checkLayout('#target > div')"> + +<div id="target"> + <div data-offset-y="20"><span></span><br><span></span></div> + <div data-offset-y="0"><span></span><br><span></span></div> + <div data-offset-y="55"><span></span><br><span></span></div> +</div> diff --git a/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-fieldset-001.html b/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-fieldset-001.html new file mode 100644 index 0000000000..2ffec5317a --- /dev/null +++ b/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-fieldset-001.html @@ -0,0 +1,46 @@ +<!DOCTYPE html> +<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/7656#issuecomment-1248617134"> +<style> +.target { + display: flex; + position: relative; + line-height: 0; +} +.target > div { + background: hotpink; + font-size: 30px; +} +fieldset { + padding: 10px; + border: solid 10px; + margin: 0; + font-size: 20px; +} +span { + display: inline-block; + width: 1em; + height: 1em; + outline: solid cyan 3px; + outline-offset: -3px; +} +</style> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> +<body onload="checkLayout('.target > *')"> + +<div class="target" style="align-items: first baseline;"> + <div data-offset-y="20"><span></span></div> + <fieldset data-offset-y="0"> + <legend><span></span></legend> + <span></span><br><span></span> + </table> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-y="40"><span></span></div> + <fieldset data-offset-y="0"> + <span></span><br><span></span> + <legend><span></span></legend> + </table> +</div> diff --git a/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-fieldset-002.html b/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-fieldset-002.html new file mode 100644 index 0000000000..479237af62 --- /dev/null +++ b/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-fieldset-002.html @@ -0,0 +1,47 @@ +<!DOCTYPE html> +<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/7656#issuecomment-1248617134"> +<style> +.target { + display: flex; + position: relative; + line-height: 0; + writing-mode: vertical-rl; +} +.target > div { + background: hotpink; + font-size: 30px; +} +fieldset { + padding: 10px; + border: solid 10px; + margin: 0; + font-size: 20px; +} +span { + display: inline-block; + width: 1em; + height: 1em; + outline: solid cyan 3px; + outline-offset: -3px; +} +</style> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> +<body onload="checkLayout('.target > *')"> + +<div class="target" style="align-items: first baseline;"> + <div data-offset-x="35"><span></span></div> + <fieldset data-offset-x="0"> + <legend><span></span></legend> + <span></span><br><span></span> + </table> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-x="15"><span></span></div> + <fieldset data-offset-x="0"> + <span></span><br><span></span> + <legend><span></span></legend> + </table> +</div> diff --git a/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-fieldset-003.html b/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-fieldset-003.html new file mode 100644 index 0000000000..c324380720 --- /dev/null +++ b/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-fieldset-003.html @@ -0,0 +1,47 @@ +<!DOCTYPE html> +<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/7656#issuecomment-1248617134"> +<style> +.target { + display: flex; + position: relative; + line-height: 0; + writing-mode: vertical-lr; +} +.target > div { + background: hotpink; + font-size: 30px; +} +fieldset { + padding: 10px; + border: solid 10px; + margin: 0; + font-size: 20px; +} +span { + display: inline-block; + width: 1em; + height: 1em; + outline: solid cyan 3px; + outline-offset: -3px; +} +</style> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> +<body onload="checkLayout('.target > *')"> + +<div class="target" style="align-items: first baseline;"> + <div data-offset-x="25"><span></span></div> + <fieldset data-offset-x="0"> + <legend><span></span></legend> + <span></span><br><span></span> + </table> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-x="45"><span></span></div> + <fieldset data-offset-x="0"> + <span></span><br><span></span> + <legend><span></span></legend> + </table> +</div> diff --git a/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-flex-001.html b/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-flex-001.html new file mode 100644 index 0000000000..dda6c379eb --- /dev/null +++ b/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-flex-001.html @@ -0,0 +1,260 @@ +<!DOCTYPE html> +<link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#flex-baselines"> +<style> +.target { + display: flex; + position: relative; + line-height: 0; + font-size: 20px; + inline-size: 200px; + margin-block: 10px; + padding: 10px; + border: solid 3px; +} + +.inner { + display: flex; + border: solid 5px; + padding: 10px; +} + +span { + display: inline-block; + width: 1em; + height: 1em; + outline: solid cyan 3px; + outline-offset: -3px; +} +</style> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> +<body onload="checkLayout('.target > *')"> + +<div class="target" style="align-items: first baseline;"> + <div data-offset-y="15"><span></span></div> + <div class="inner" data-offset-y="10"> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 30px;"><span></span></div> + </div> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-y="35"><span></span></div> + <div class="inner" data-offset-y="10"> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 30px;"><span></span></div> + </div> +</div> + +<div class="target" style="align-items: first baseline;"> + <div data-offset-y="35"><span></span></div> + <div class="inner" style="flex-direction: row-reverse;" data-offset-y="10"> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 30px;"><span></span></div> + </div> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-y="15"><span></span></div> + <div class="inner" style="flex-direction: row-reverse;" data-offset-y="10"> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 30px;"><span></span></div> + </div> +</div> + +<div class="target" style="align-items: first baseline;"> + <div data-offset-y="15"><span></span></div> + <div class="inner" style="flex-direction: column;" data-offset-y="10"> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 30px;"><span></span></div> + </div> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-y="45"><span></span></div> + <div class="inner" style="flex-direction: column;" data-offset-y="10"> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 30px;"><span></span></div> + </div> +</div> + +<div class="target" style="align-items: first baseline;"> + <div data-offset-y="35"><span></span></div> + <div class="inner" style="flex-direction: column-reverse;" data-offset-y="10"> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 30px;"><span></span></div> + </div> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-y="45"><span></span></div> + <div class="inner" style="flex-direction: column-reverse;" data-offset-y="10"> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 30px;"><span></span></div> + </div> +</div> + +<!-- flex-wrap: wrap --> + +<div class="target" style="align-items: first baseline;"> + <div data-offset-y="25"><span></span></div> + <div class="inner" style="flex-wrap: wrap; inline-size: 50px;" data-offset-y="10"> + <div style="font-size: 20px;"><span></span></div> + <div style="font-size: 30px;"><span></span></div> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 35px;"><span></span></div> + </div> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-y="70"><span></span></div> + <div class="inner" style="flex-wrap: wrap; inline-size: 50px;" data-offset-y="10"> + <div style="font-size: 20px;"><span></span></div> + <div style="font-size: 30px;"><span></span></div> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 35px;"><span></span></div> + </div> +</div> + +<div class="target" style="align-items: first baseline;"> + <div data-offset-y="35"><span></span></div> + <div class="inner" style="flex-wrap: wrap; flex-direction: row-reverse; inline-size: 50px;" data-offset-y="10"> + <div style="font-size: 20px;"><span></span></div> + <div style="font-size: 30px;"><span></span></div> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 35px;"><span></span></div> + </div> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-y="45"><span></span></div> + <div class="inner" style="flex-wrap: wrap; flex-direction: row-reverse; inline-size: 50px;" data-offset-y="10"> + <div style="font-size: 20px;"><span></span></div> + <div style="font-size: 30px;"><span></span></div> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 35px;"><span></span></div> + </div> +</div> + +<div class="target" style="align-items: first baseline;"> + <div data-offset-y="25"><span></span></div> + <div class="inner" style="flex-wrap: wrap; flex-direction: column; block-size: 50px;" data-offset-y="10"> + <div style="font-size: 20px;"><span></span></div> + <div style="font-size: 30px;"><span></span></div> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 35px;"><span></span></div> + </div> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-y="50"><span></span></div> + <div class="inner" style="flex-wrap: wrap; flex-direction: column; block-size: 50px;" data-offset-y="10"> + <div style="font-size: 20px;"><span></span></div> + <div style="font-size: 30px;"><span></span></div> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 35px;"><span></span></div> + </div> +</div> + +<div class="target" style="align-items: first baseline;"> + <div data-offset-y="35"><span></span></div> + <div class="inner" style="flex-wrap: wrap; flex-direction: column-reverse; block-size: 50px;" data-offset-y="10"> + <div style="font-size: 20px;"><span></span></div> + <div style="font-size: 30px;"><span></span></div> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 35px;"><span></span></div> + </div> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-y="55"><span></span></div> + <div class="inner" style="flex-wrap: wrap; flex-direction: column-reverse; block-size: 50px;" data-offset-y="10"> + <div style="font-size: 20px;"><span></span></div> + <div style="font-size: 30px;"><span></span></div> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 35px;"><span></span></div> + </div> +</div> + +<!-- flex-wrap: wrap-reverse --> + +<div class="target" style="align-items: first baseline;"> + <div data-offset-y="15"><span></span></div> + <div class="inner" style="flex-wrap: wrap-reverse; inline-size: 50px;" data-offset-y="10"> + <div style="font-size: 20px;"><span></span></div> + <div style="font-size: 30px;"><span></span></div> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 35px;"><span></span></div> + </div> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-y="70"><span></span></div> + <div class="inner" style="flex-wrap: wrap-reverse; inline-size: 50px;" data-offset-y="10"> + <div style="font-size: 20px;"><span></span></div> + <div style="font-size: 30px;"><span></span></div> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 35px;"><span></span></div> + </div> +</div> + +<div class="target" style="align-items: first baseline;"> + <div data-offset-y="40"><span></span></div> + <div class="inner" style="flex-wrap: wrap-reverse; flex-direction: row-reverse; inline-size: 50px;" data-offset-y="10"> + <div style="font-size: 20px;"><span></span></div> + <div style="font-size: 30px;"><span></span></div> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 35px;"><span></span></div> + </div> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-y="60"><span></span></div> + <div class="inner" style="flex-wrap: wrap-reverse; flex-direction: row-reverse; inline-size: 50px;" data-offset-y="10"> + <div style="font-size: 20px;"><span></span></div> + <div style="font-size: 30px;"><span></span></div> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 35px;"><span></span></div> + </div> +</div> + +<div class="target" style="align-items: first baseline;"> + <div data-offset-y="15"><span></span></div> + <div class="inner" style="flex-wrap: wrap-reverse; flex-direction: column; block-size: 50px;" data-offset-y="10"> + <div style="font-size: 20px;"><span></span></div> + <div style="font-size: 30px;"><span></span></div> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 35px;"><span></span></div> + </div> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-y="55"><span></span></div> + <div class="inner" style="flex-wrap: wrap-reverse; flex-direction: column; block-size: 50px;" data-offset-y="10"> + <div style="font-size: 20px;"><span></span></div> + <div style="font-size: 30px;"><span></span></div> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 35px;"><span></span></div> + </div> +</div> + +<div class="target" style="align-items: first baseline;"> + <div data-offset-y="45"><span></span></div> + <div class="inner" style="flex-wrap: wrap-reverse; flex-direction: column-reverse; block-size: 50px;" data-offset-y="10"> + <div style="font-size: 20px;"><span></span></div> + <div style="font-size: 30px;"><span></span></div> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 35px;"><span></span></div> + </div> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-y="55"><span></span></div> + <div class="inner" style="flex-wrap: wrap-reverse; flex-direction: column-reverse; block-size: 50px;" data-offset-y="10"> + <div style="font-size: 20px;"><span></span></div> + <div style="font-size: 30px;"><span></span></div> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 35px;"><span></span></div> + </div> +</div> diff --git a/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-flex-002.html b/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-flex-002.html new file mode 100644 index 0000000000..fc8e9f769c --- /dev/null +++ b/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-flex-002.html @@ -0,0 +1,261 @@ +<!DOCTYPE html> +<link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#flex-baselines"> +<style> +.target { + display: flex; + position: relative; + line-height: 0; + font-size: 20px; + inline-size: 200px; + margin-inline: 10px; + padding: 10px; + border: solid 3px; + writing-mode: vertical-rl; +} + +.inner { + display: flex; + border: solid 5px; + padding: 10px; +} + +span { + display: inline-block; + width: 1em; + height: 1em; + outline: solid cyan 3px; + outline-offset: -3px; +} +</style> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> +<body onload="checkLayout('.target > *')"> + +<div class="target" style="align-items: first baseline;"> + <div data-offset-x="40"><span></span></div> + <div class="inner" data-offset-x="10"> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 30px;"><span></span></div> + </div> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-x="30"><span></span></div> + <div class="inner" data-offset-x="10"> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 30px;"><span></span></div> + </div> +</div> + +<div class="target" style="align-items: first baseline;"> + <div data-offset-x="30"><span></span></div> + <div class="inner" style="flex-direction: row-reverse;" data-offset-x="10"> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 30px;"><span></span></div> + </div> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-x="40"><span></span></div> + <div class="inner" style="flex-direction: row-reverse;" data-offset-x="10"> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 30px;"><span></span></div> + </div> +</div> + +<div class="target" style="align-items: first baseline;"> + <div data-offset-x="50"><span></span></div> + <div class="inner" style="flex-direction: column;" data-offset-x="10"> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 30px;"><span></span></div> + </div> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-x="30"><span></span></div> + <div class="inner" style="flex-direction: column;" data-offset-x="10"> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 30px;"><span></span></div> + </div> +</div> + +<div class="target" style="align-items: first baseline;"> + <div data-offset-x="40"><span></span></div> + <div class="inner" style="flex-direction: column-reverse;" data-offset-x="10"> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 30px;"><span></span></div> + </div> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-x="20"><span></span></div> + <div class="inner" style="flex-direction: column-reverse;" data-offset-x="10"> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 30px;"><span></span></div> + </div> +</div> + +<!-- flex-wrap: wrap --> + +<div class="target" style="align-items: first baseline;"> + <div data-offset-x="70"><span></span></div> + <div class="inner" style="flex-wrap: wrap; inline-size: 50px;" data-offset-x="10"> + <div style="font-size: 20px;"><span></span></div> + <div style="font-size: 30px;"><span></span></div> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 35px;"><span></span></div> + </div> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-x="33"><span></span></div> + <div class="inner" style="flex-wrap: wrap; inline-size: 50px;" data-offset-x="10"> + <div style="font-size: 20px;"><span></span></div> + <div style="font-size: 30px;"><span></span></div> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 35px;"><span></span></div> + </div> +</div> + +<div class="target" style="align-items: first baseline;"> + <div data-offset-x="65"><span></span></div> + <div class="inner" style="flex-wrap: wrap; flex-direction: row-reverse; inline-size: 50px;" data-offset-x="10"> + <div style="font-size: 20px;"><span></span></div> + <div style="font-size: 30px;"><span></span></div> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 35px;"><span></span></div> + </div> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-x="45"><span></span></div> + <div class="inner" style="flex-wrap: wrap; flex-direction: row-reverse; inline-size: 50px;" data-offset-x="10"> + <div style="font-size: 20px;"><span></span></div> + <div style="font-size: 30px;"><span></span></div> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 35px;"><span></span></div> + </div> +</div> + +<div class="target" style="align-items: first baseline;"> + <div data-offset-x="55"><span></span></div> + <div class="inner" style="flex-wrap: wrap; flex-direction: column; block-size: 50px;" data-offset-x="10"> + <div style="font-size: 20px;"><span></span></div> + <div style="font-size: 30px;"><span></span></div> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 35px;"><span></span></div> + </div> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-x="38"><span></span></div> + <div class="inner" style="flex-wrap: wrap; flex-direction: column; block-size: 50px;" data-offset-x="10"> + <div style="font-size: 20px;"><span></span></div> + <div style="font-size: 30px;"><span></span></div> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 35px;"><span></span></div> + </div> +</div> + +<div class="target" style="align-items: first baseline;"> + <div data-offset-x="50"><span></span></div> + <div class="inner" style="flex-wrap: wrap; flex-direction: column-reverse; block-size: 50px;" data-offset-x="10"> + <div style="font-size: 20px;"><span></span></div> + <div style="font-size: 30px;"><span></span></div> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 35px;"><span></span></div> + </div> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-x="20"><span></span></div> + <div class="inner" style="flex-wrap: wrap; flex-direction: column-reverse; block-size: 50px;" data-offset-x="10"> + <div style="font-size: 20px;"><span></span></div> + <div style="font-size: 30px;"><span></span></div> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 35px;"><span></span></div> + </div> +</div> + +<!-- flex-wrap: wrap-reverse --> + +<div class="target" style="align-items: first baseline;"> + <div data-offset-x="75"><span></span></div> + <div class="inner" style="flex-wrap: wrap-reverse; inline-size: 50px;" data-offset-x="10"> + <div style="font-size: 20px;"><span></span></div> + <div style="font-size: 30px;"><span></span></div> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 35px;"><span></span></div> + </div> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-x="30"><span></span></div> + <div class="inner" style="flex-wrap: wrap-reverse; inline-size: 50px;" data-offset-x="10"> + <div style="font-size: 20px;"><span></span></div> + <div style="font-size: 30px;"><span></span></div> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 35px;"><span></span></div> + </div> +</div> + +<div class="target" style="align-items: first baseline;"> + <div data-offset-x="63"><span></span></div> + <div class="inner" style="flex-wrap: wrap-reverse; flex-direction: row-reverse; inline-size: 50px;" data-offset-x="10"> + <div style="font-size: 20px;"><span></span></div> + <div style="font-size: 30px;"><span></span></div> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 35px;"><span></span></div> + </div> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-x="35"><span></span></div> + <div class="inner" style="flex-wrap: wrap-reverse; flex-direction: row-reverse; inline-size: 50px;" data-offset-x="10"> + <div style="font-size: 20px;"><span></span></div> + <div style="font-size: 30px;"><span></span></div> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 35px;"><span></span></div> + </div> +</div> + +<div class="target" style="align-items: first baseline;"> + <div data-offset-x="60"><span></span></div> + <div class="inner" style="flex-wrap: wrap-reverse; flex-direction: column; block-size: 50px;" data-offset-x="10"> + <div style="font-size: 20px;"><span></span></div> + <div style="font-size: 30px;"><span></span></div> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 35px;"><span></span></div> + </div> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-x="30"><span></span></div> + <div class="inner" style="flex-wrap: wrap-reverse; flex-direction: column; block-size: 50px;" data-offset-x="10"> + <div style="font-size: 20px;"><span></span></div> + <div style="font-size: 30px;"><span></span></div> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 35px;"><span></span></div> + </div> +</div> + +<div class="target" style="align-items: first baseline;"> + <div data-offset-x="43"><span></span></div> + <div class="inner" style="flex-wrap: wrap-reverse; flex-direction: column-reverse; block-size: 50px;" data-offset-x="10"> + <div style="font-size: 20px;"><span></span></div> + <div style="font-size: 30px;"><span></span></div> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 35px;"><span></span></div> + </div> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-x="25"><span></span></div> + <div class="inner" style="flex-wrap: wrap-reverse; flex-direction: column-reverse; block-size: 50px;" data-offset-x="10"> + <div style="font-size: 20px;"><span></span></div> + <div style="font-size: 30px;"><span></span></div> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 35px;"><span></span></div> + </div> +</div> diff --git a/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-flex-003.html b/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-flex-003.html new file mode 100644 index 0000000000..0d2c2a72ae --- /dev/null +++ b/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-flex-003.html @@ -0,0 +1,129 @@ +<!DOCTYPE html> +<link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#flex-baselines"> +<style> +.target { + display: flex; + position: relative; + line-height: 0; + font-size: 20px; + inline-size: 200px; + margin-block: 10px; + padding: 10px; + border: solid 3px; +} + +.inner { + display: flex; + border: solid 5px; + padding: 10px; + gap: 10px; +} + +span { + display: inline-block; + width: 1em; + height: 1em; + outline: solid cyan 3px; + outline-offset: -3px; +} +</style> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> +<body onload="checkLayout('.target > *')"> + +<div class="target" style="align-items: first baseline;"> + <div data-offset-y="45"><span></span></div> + <div class="inner" style="inline-size: 140px; flex-wrap: wrap;" data-offset-y="10"> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 30px; margin-block: 10px; align-self: first baseline;"><span></span></div> + <div style="font-size: 50px;"><span></span></div> + <div style="font-size: 60px;"><span></span></div> + <div style="font-size: 40px; margin-block: 10px; align-self: first baseline;"><span></span></div> + <div style="font-size: 20px;"><span></span></div> + </div> +</div> + +<div class="target" style="align-items: first baseline;"> + <div data-offset-y="45"><span></span></div> + <div class="inner" style="inline-size: 140px; flex-wrap: wrap;" data-offset-y="10"> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 30px; margin-block: 10px; align-self: last baseline;"><span></span></div> + <div style="font-size: 50px;"><span></span></div> + <div style="font-size: 60px;"><span></span></div> + <div style="font-size: 40px; margin-block: 10px; align-self: last baseline;"><span></span></div> + <div style="font-size: 20px;"><span></span></div> + </div> +</div> + +<div class="target" style="align-items: first baseline;"> + <div data-offset-y="55"><span></span></div> + <div class="inner" style="inline-size: 140px; flex-wrap: wrap-reverse;" data-offset-y="10"> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 30px; margin-block: 10px; align-self: first baseline;"><span></span></div> + <div style="font-size: 50px;"><span></span></div> + <div style="font-size: 60px;"><span></span></div> + <div style="font-size: 40px; margin-block: 10px; align-self: first baseline;"><span></span></div> + <div style="font-size: 20px;"><span></span></div> + </div> +</div> + +<div class="target" style="align-items: first baseline;"> + <div data-offset-y="55"><span></span></div> + <div class="inner" style="inline-size: 140px; flex-wrap: wrap-reverse;" data-offset-y="10"> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 30px; margin-block: 10px; align-self: last baseline;"><span></span></div> + <div style="font-size: 50px;"><span></span></div> + <div style="font-size: 60px;"><span></span></div> + <div style="font-size: 40px; margin-block: 10px; align-self: last baseline;"><span></span></div> + <div style="font-size: 20px;"><span></span></div> + </div> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-y="115"><span></span></div> + <div class="inner" style="inline-size: 140px; flex-wrap: wrap;" data-offset-y="10"> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 30px; margin-block: 10px; align-self: first baseline;"><span></span></div> + <div style="font-size: 50px;"><span></span></div> + <div style="font-size: 60px;"><span></span></div> + <div style="font-size: 40px; margin-block: 10px; align-self: first baseline;"><span></span></div> + <div style="font-size: 20px;"><span></span></div> + </div> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-y="115"><span></span></div> + <div class="inner" style="inline-size: 140px; flex-wrap: wrap;" data-offset-y="10"> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 30px; margin-block: 10px; align-self: last baseline;"><span></span></div> + <div style="font-size: 50px;"><span></span></div> + <div style="font-size: 60px;"><span></span></div> + <div style="font-size: 40px; margin-block: 10px; align-self: last baseline;"><span></span></div> + <div style="font-size: 20px;"><span></span></div> + </div> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-y="115"><span></span></div> + <div class="inner" style="inline-size: 140px; flex-wrap: wrap-reverse;" data-offset-y="10"> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 30px; margin-block: 10px; align-self: first baseline;"><span></span></div> + <div style="font-size: 50px;"><span></span></div> + <div style="font-size: 60px;"><span></span></div> + <div style="font-size: 40px; margin-block: 10px; align-self: first baseline;"><span></span></div> + <div style="font-size: 20px;"><span></span></div> + </div> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-y="115"><span></span></div> + <div class="inner" style="inline-size: 140px; flex-wrap: wrap-reverse;" data-offset-y="10"> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 30px; margin-block: 10px; align-self: last baseline;"><span></span></div> + <div style="font-size: 50px;"><span></span></div> + <div style="font-size: 60px;"><span></span></div> + <div style="font-size: 40px; margin-block: 10px; align-self: last baseline;"><span></span></div> + <div style="font-size: 20px;"><span></span></div> + </div> +</div> diff --git a/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-flex-004.html b/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-flex-004.html new file mode 100644 index 0000000000..eaedd81728 --- /dev/null +++ b/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-flex-004.html @@ -0,0 +1,130 @@ +<!DOCTYPE html> +<link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#flex-baselines"> +<style> +.target { + display: flex; + position: relative; + line-height: 0; + font-size: 20px; + inline-size: 200px; + margin-block: 10px; + padding: 10px; + border: solid 3px; + writing-mode: vertical-rl; +} + +.inner { + display: flex; + border: solid 5px; + padding: 10px; + gap: 10px; +} + +span { + display: inline-block; + width: 1em; + height: 1em; + outline: solid cyan 3px; + outline-offset: -3px; +} +</style> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> +<body onload="checkLayout('.target > *')"> + +<div class="target" style="align-items: first baseline;"> + <div data-offset-x="110"><span></span></div> + <div class="inner" style="inline-size: 140px; flex-wrap: wrap;" data-offset-x="10"> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 30px; margin-block: 10px; align-self: first baseline;"><span></span></div> + <div style="font-size: 50px;"><span></span></div> + <div style="font-size: 60px;"><span></span></div> + <div style="font-size: 40px; margin-block: 10px; align-self: first baseline;"><span></span></div> + <div style="font-size: 20px;"><span></span></div> + </div> +</div> + +<div class="target" style="align-items: first baseline;"> + <div data-offset-x="110"><span></span></div> + <div class="inner" style="inline-size: 140px; flex-wrap: wrap;" data-offset-x="10"> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 30px; margin-block: 10px; align-self: last baseline;"><span></span></div> + <div style="font-size: 50px;"><span></span></div> + <div style="font-size: 60px;"><span></span></div> + <div style="font-size: 40px; margin-block: 10px; align-self: last baseline;"><span></span></div> + <div style="font-size: 20px;"><span></span></div> + </div> +</div> + +<div class="target" style="align-items: first baseline;"> + <div data-offset-x="105"><span></span></div> + <div class="inner" style="inline-size: 140px; flex-wrap: wrap-reverse;" data-offset-x="10"> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 30px; margin-block: 10px; align-self: first baseline;"><span></span></div> + <div style="font-size: 50px;"><span></span></div> + <div style="font-size: 60px;"><span></span></div> + <div style="font-size: 40px; margin-block: 10px; align-self: first baseline;"><span></span></div> + <div style="font-size: 20px;"><span></span></div> + </div> +</div> + +<div class="target" style="align-items: first baseline;"> + <div data-offset-x="105"><span></span></div> + <div class="inner" style="inline-size: 140px; flex-wrap: wrap-reverse;" data-offset-x="10"> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 30px; margin-block: 10px; align-self: last baseline;"><span></span></div> + <div style="font-size: 50px;"><span></span></div> + <div style="font-size: 60px;"><span></span></div> + <div style="font-size: 40px; margin-block: 10px; align-self: last baseline;"><span></span></div> + <div style="font-size: 20px;"><span></span></div> + </div> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-x="45"><span></span></div> + <div class="inner" style="inline-size: 140px; flex-wrap: wrap;" data-offset-x="10"> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 30px; margin-block: 10px; align-self: first baseline;"><span></span></div> + <div style="font-size: 50px;"><span></span></div> + <div style="font-size: 60px;"><span></span></div> + <div style="font-size: 40px; margin-block: 10px; align-self: first baseline;"><span></span></div> + <div style="font-size: 20px;"><span></span></div> + </div> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-x="45"><span></span></div> + <div class="inner" style="inline-size: 140px; flex-wrap: wrap;" data-offset-x="10"> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 30px; margin-block: 10px; align-self: last baseline;"><span></span></div> + <div style="font-size: 50px;"><span></span></div> + <div style="font-size: 60px;"><span></span></div> + <div style="font-size: 40px; margin-block: 10px; align-self: last baseline;"><span></span></div> + <div style="font-size: 20px;"><span></span></div> + </div> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-x="40"><span></span></div> + <div class="inner" style="inline-size: 140px; flex-wrap: wrap-reverse;" data-offset-x="10"> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 30px; margin-block: 10px; align-self: first baseline;"><span></span></div> + <div style="font-size: 50px;"><span></span></div> + <div style="font-size: 60px;"><span></span></div> + <div style="font-size: 40px; margin-block: 10px; align-self: first baseline;"><span></span></div> + <div style="font-size: 20px;"><span></span></div> + </div> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-x="40"><span></span></div> + <div class="inner" style="inline-size: 140px; flex-wrap: wrap-reverse;" data-offset-x="10"> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 30px; margin-block: 10px; align-self: last baseline;"><span></span></div> + <div style="font-size: 50px;"><span></span></div> + <div style="font-size: 60px;"><span></span></div> + <div style="font-size: 40px; margin-block: 10px; align-self: last baseline;"><span></span></div> + <div style="font-size: 20px;"><span></span></div> + </div> +</div> diff --git a/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-grid-001.html b/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-grid-001.html new file mode 100644 index 0000000000..d4bba0871a --- /dev/null +++ b/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-grid-001.html @@ -0,0 +1,111 @@ +<!DOCTYPE html> +<link rel="help" href="https://drafts.csswg.org/css-grid-1/#grid-baselines"> +<style> +.target { + display: flex; + position: relative; + line-height: 0; + font-size: 20px; + inline-size: 300px; + margin-block: 10px; + padding: 10px; + border: solid 3px; +} + +.inner { + display: grid; + gap: 10px; + grid-template: 50px 50px / 50px 50px 50px; + border: solid 5px; + padding: 10px; +} + +.inner > div:first-child, +.inner > div:last-child { + align-self: start; +} + +span { + display: inline-block; + width: 1em; + height: 1em; + outline: solid cyan 3px; + outline-offset: -3px; +} +</style> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> +<body onload="checkLayout('.target > *')"> + +<div class="target" style="align-items: first baseline;"> + <div data-offset-y="35"><span></span></div> + <div class="inner" style="align-items: first baseline;" data-offset-y="10"> + <div style="font-size: 20px;"><span></span></div> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 30px;"><span></span></div> + <div style="font-size: 15px;"><span></span></div> + <div style="font-size: 35px;"><span></span></div> + <div style="font-size: 25px;"><span></span></div> + </div> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-y="100"><span></span></div> + <div class="inner" style="align-items: first baseline;" data-offset-y="10"> + <div style="font-size: 20px;"><span></span></div> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 30px;"><span></span></div> + <div style="font-size: 15px;"><span></span></div> + <div style="font-size: 35px;"><span></span></div> + <div style="font-size: 25px;"><span></span></div> + </div> +</div> + +<div class="target" style="align-items: first baseline;"> + <div data-offset-y="55"><span></span></div> + <div class="inner" style="align-items: last baseline;" data-offset-y="10"> + <div style="font-size: 20px;"><span></span></div> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 30px;"><span></span></div> + <div style="font-size: 15px;"><span></span></div> + <div style="font-size: 35px;"><span></span></div> + <div style="font-size: 25px;"><span></span></div> + </div> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-y="115"><span></span></div> + <div class="inner" style="align-items: last baseline;" data-offset-y="10"> + <div style="font-size: 20px;"><span></span></div> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 30px;"><span></span></div> + <div style="font-size: 15px;"><span></span></div> + <div style="font-size: 35px;"><span></span></div> + <div style="font-size: 25px;"><span></span></div> + </div> +</div> + +<div class="target" style="align-items: first baseline;"> + <div data-offset-y="25"><span></span></div> + <div class="inner" style="align-items: end;" data-offset-y="10"> + <div style="font-size: 20px;"><span></span></div> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 30px;"><span></span></div> + <div style="font-size: 15px;"><span></span></div> + <div style="font-size: 35px;"><span></span></div> + <div style="font-size: 25px;"><span></span></div> + </div> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-y="90"><span></span></div> + <div class="inner" style="align-items: end;" data-offset-y="10"> + <div style="font-size: 20px;"><span></span></div> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 30px;"><span></span></div> + <div style="font-size: 15px;"><span></span></div> + <div style="font-size: 35px;"><span></span></div> + <div style="font-size: 25px;"><span></span></div> + </div> +</div> diff --git a/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-grid-002.html b/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-grid-002.html new file mode 100644 index 0000000000..f8d0ef53eb --- /dev/null +++ b/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-grid-002.html @@ -0,0 +1,112 @@ +<!DOCTYPE html> +<link rel="help" href="https://drafts.csswg.org/css-grid-1/#grid-baselines"> +<style> +.target { + display: flex; + position: relative; + line-height: 0; + font-size: 20px; + inline-size: 300px; + margin-block: 10px; + padding: 10px; + border: solid 3px; + writing-mode: vertical-rl; +} + +.inner { + display: grid; + gap: 10px; + grid-template: 50px 50px / 50px 50px 50px; + border: solid 5px; + padding: 10px; +} + +.inner > div:first-child, +.inner > div:last-child { + align-self: start; +} + +span { + display: inline-block; + width: 1em; + height: 1em; + outline: solid cyan 3px; + outline-offset: -3px; +} +</style> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> +<body onload="checkLayout('.target > *')"> + +<div class="target" style="align-items: first baseline;"> + <div data-offset-x="110"><span></span></div> + <div class="inner" style="align-items: first baseline;" data-offset-x="10"> + <div style="font-size: 20px;"><span></span></div> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 30px;"><span></span></div> + <div style="font-size: 15px;"><span></span></div> + <div style="font-size: 35px;"><span></span></div> + <div style="font-size: 25px;"><span></span></div> + </div> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-x="48"><span></span></div> + <div class="inner" style="align-items: first baseline;" data-offset-x="10"> + <div style="font-size: 20px;"><span></span></div> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 30px;"><span></span></div> + <div style="font-size: 15px;"><span></span></div> + <div style="font-size: 35px;"><span></span></div> + <div style="font-size: 25px;"><span></span></div> + </div> +</div> + +<div class="target" style="align-items: first baseline;"> + <div data-offset-x="90"><span></span></div> + <div class="inner" style="align-items: last baseline;" data-offset-x="10"> + <div style="font-size: 20px;"><span></span></div> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 30px;"><span></span></div> + <div style="font-size: 15px;"><span></span></div> + <div style="font-size: 35px;"><span></span></div> + <div style="font-size: 25px;"><span></span></div> + </div> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-x="33"><span></span></div> + <div class="inner" style="align-items: last baseline;" data-offset-x="10"> + <div style="font-size: 20px;"><span></span></div> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 30px;"><span></span></div> + <div style="font-size: 15px;"><span></span></div> + <div style="font-size: 35px;"><span></span></div> + <div style="font-size: 25px;"><span></span></div> + </div> +</div> + +<div class="target" style="align-items: first baseline;"> + <div data-offset-x="115"><span></span></div> + <div class="inner" style="align-items: end;" data-offset-x="10"> + <div style="font-size: 20px;"><span></span></div> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 30px;"><span></span></div> + <div style="font-size: 15px;"><span></span></div> + <div style="font-size: 35px;"><span></span></div> + <div style="font-size: 25px;"><span></span></div> + </div> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-x="53"><span></span></div> + <div class="inner" style="align-items: end;" data-offset-x="10"> + <div style="font-size: 20px;"><span></span></div> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 30px;"><span></span></div> + <div style="font-size: 15px;"><span></span></div> + <div style="font-size: 35px;"><span></span></div> + <div style="font-size: 25px;"><span></span></div> + </div> +</div> diff --git a/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-grid-003.html b/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-grid-003.html new file mode 100644 index 0000000000..41b86b407a --- /dev/null +++ b/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-grid-003.html @@ -0,0 +1,112 @@ +<!DOCTYPE html> +<link rel="help" href="https://drafts.csswg.org/css-grid-1/#grid-baselines"> +<style> +.target { + display: flex; + position: relative; + line-height: 0; + font-size: 20px; + inline-size: 300px; + margin-block: 10px; + padding: 10px; + border: solid 3px; + writing-mode: vertical-lr; +} + +.inner { + display: grid; + gap: 10px; + grid-template: 50px 50px / 50px 50px 50px; + border: solid 5px; + padding: 10px; +} + +.inner > div:first-child, +.inner > div:last-child { + align-self: start; +} + +span { + display: inline-block; + width: 1em; + height: 1em; + outline: solid cyan 3px; + outline-offset: -3px; +} +</style> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> +<body onload="checkLayout('.target > *')"> + +<div class="target" style="align-items: first baseline;"> + <div data-offset-x="30"><span></span></div> + <div class="inner" style="align-items: first baseline;" data-offset-x="10"> + <div style="font-size: 20px;"><span></span></div> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 30px;"><span></span></div> + <div style="font-size: 15px;"><span></span></div> + <div style="font-size: 35px;"><span></span></div> + <div style="font-size: 25px;"><span></span></div> + </div> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-x="93"><span></span></div> + <div class="inner" style="align-items: first baseline;" data-offset-x="10"> + <div style="font-size: 20px;"><span></span></div> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 30px;"><span></span></div> + <div style="font-size: 15px;"><span></span></div> + <div style="font-size: 35px;"><span></span></div> + <div style="font-size: 25px;"><span></span></div> + </div> +</div> + +<div class="target" style="align-items: first baseline;"> + <div data-offset-x="50"><span></span></div> + <div class="inner" style="align-items: last baseline;" data-offset-x="10"> + <div style="font-size: 20px;"><span></span></div> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 30px;"><span></span></div> + <div style="font-size: 15px;"><span></span></div> + <div style="font-size: 35px;"><span></span></div> + <div style="font-size: 25px;"><span></span></div> + </div> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-x="108"><span></span></div> + <div class="inner" style="align-items: last baseline;" data-offset-x="10"> + <div style="font-size: 20px;"><span></span></div> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 30px;"><span></span></div> + <div style="font-size: 15px;"><span></span></div> + <div style="font-size: 35px;"><span></span></div> + <div style="font-size: 25px;"><span></span></div> + </div> +</div> + +<div class="target" style="align-items: first baseline;"> + <div data-offset-x="25"><span></span></div> + <div class="inner" style="align-items: end;" data-offset-x="10"> + <div style="font-size: 20px;"><span></span></div> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 30px;"><span></span></div> + <div style="font-size: 15px;"><span></span></div> + <div style="font-size: 35px;"><span></span></div> + <div style="font-size: 25px;"><span></span></div> + </div> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-x="88"><span></span></div> + <div class="inner" style="align-items: end;" data-offset-x="10"> + <div style="font-size: 20px;"><span></span></div> + <div style="font-size: 10px;"><span></span></div> + <div style="font-size: 30px;"><span></span></div> + <div style="font-size: 15px;"><span></span></div> + <div style="font-size: 35px;"><span></span></div> + <div style="font-size: 25px;"><span></span></div> + </div> +</div> diff --git a/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-line-clamp-001.tentative.html b/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-line-clamp-001.tentative.html new file mode 100644 index 0000000000..75da7e3a43 --- /dev/null +++ b/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-line-clamp-001.tentative.html @@ -0,0 +1,128 @@ +<!DOCTYPE html> +<link rel="help" href="https://drafts.csswg.org/css-align-3/#valdef-justify-self-last-baseline"> +<style> +.target { + display: flex; + inline-size: 100px; + position: relative; + line-height: 0; + padding: 10px; +} +.target > div { + background: hotpink; + font-size: 30px; +} +.line-clamp { + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 3; + border: solid 10px; + font-size: 40px !important; + overflow: hidden; +} +.line-clamp div { + background: orange; +} +span { + display: inline-block; + width: 1em; + height: 1em; + outline: solid cyan 3px; + outline-offset: -3px; +} +</style> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> +<body onload="checkLayout('.target > *')"> + +<!-- Five lines --> +<div class="target" style="align-items: first baseline;"> + <div data-offset-y="30"><span></span></div> + <div class="line-clamp" data-offset-y="10"> + <span></span><br><span></span><br><span></span><br><span></span><br><span></span> + </div> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-y="110"><span></span></div> + <div class="line-clamp" data-offset-y="10"> + <span></span><br><span></span><br><span></span><br><span></span><br><span></span> + </div> +</div> + +<!-- Two lines --> +<div class="target" style="align-items: first baseline;"> + <div data-offset-y="30"><span></span></div> + <div class="line-clamp" data-offset-y="10"> + <span></span><br><span></span> + </div> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-y="70"><span></span></div> + <div class="line-clamp" data-offset-y="10"> + <span></span><br><span></span> + </div> +</div> + +<!-- Three lines --> +<div class="target" style="align-items: first baseline;"> + <div data-offset-y="30"><span></span></div> + <div class="line-clamp" data-offset-y="10"> + <span></span><br><span></span><br><span></span> + </div> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-y="110"><span></span></div> + <div class="line-clamp" data-offset-y="10"> + <span></span><br><span></span><br><span></span> + </div> +</div> + + +<!-- Wrapping div --> +<div class="target" style="align-items: first baseline;"> + <div data-offset-y="30"><span></span></div> + <div class="line-clamp" data-offset-y="10"> + <div><span></span><br><span></span><br><span></span><br><span></span><br><span></span></div> + </div> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-y="110"><span></span></div> + <div class="line-clamp" data-offset-y="10"> + <div><span></span><br><span></span><br><span></span><br><span></span><br><span></span></div> + </div> +</div> + +<!-- Nested div after first line --> +<div class="target" style="align-items: first baseline;"> + <div data-offset-y="30"><span></span></div> + <div class="line-clamp" data-offset-y="10"> + <span></span><div><span></span><br><span></span><br><span></span><br><span></span></div> + </div> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-y="110"><span></span></div> + <div class="line-clamp" data-offset-y="10"> + <span></span><div><span></span><br><span></span><br><span></span><br><span></span></div> + </div> +</div> + +<!-- Block within inline. --> +<div class="target" style="align-items: first baseline;"> + <div data-offset-y="30"><span></span></div> + <div class="line-clamp" data-offset-y="10"> + <span></span><br><i><span></span><div><span></span><br><span></span><br><span></span></div></i> + </div> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-y="110"><span></span></div> + <div class="line-clamp" data-offset-y="10"> + <span></span><br><i><span></span><div><span></span><br><span></span><br><span></span></div></i> + </div> +</div> diff --git a/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-line-clamp-002.tentative.html b/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-line-clamp-002.tentative.html new file mode 100644 index 0000000000..4243f4a033 --- /dev/null +++ b/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-line-clamp-002.tentative.html @@ -0,0 +1,129 @@ +<!DOCTYPE html> +<link rel="help" href="https://drafts.csswg.org/css-align-3/#valdef-justify-self-last-baseline"> +<style> +.target { + display: flex; + inline-size: 100px; + position: relative; + line-height: 0; + padding: 10px; + writing-mode: vertical-rl; +} +.target > div { + background: hotpink; + font-size: 30px; +} +.line-clamp { + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 3; + border: solid 10px; + font-size: 40px !important; + overflow: hidden; +} +.line-clamp div { + background: orange; +} +span { + display: inline-block; + width: 1em; + height: 1em; + outline: solid cyan 3px; + outline-offset: -3px; +} +</style> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> +<body onload="checkLayout('.target > *')"> + +<!-- Five lines --> +<div class="target" style="align-items: first baseline;"> + <div data-offset-x="105"><span></span></div> + <div class="line-clamp" data-offset-x="10"> + <span></span><br><span></span><br><span></span><br><span></span><br><span></span> + </div> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-x="25"><span></span></div> + <div class="line-clamp" data-offset-x="10"> + <span></span><br><span></span><br><span></span><br><span></span><br><span></span> + </div> +</div> + +<!-- Two lines --> +<div class="target" style="align-items: first baseline;"> + <div data-offset-x="65"><span></span></div> + <div class="line-clamp" data-offset-x="10"> + <span></span><br><span></span> + </div> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-x="25"><span></span></div> + <div class="line-clamp" data-offset-x="10"> + <span></span><br><span></span> + </div> +</div> + +<!-- Three lines --> +<div class="target" style="align-items: first baseline;"> + <div data-offset-x="105"><span></span></div> + <div class="line-clamp" data-offset-x="10"> + <span></span><br><span></span><br><span></span> + </div> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-x="25"><span></span></div> + <div class="line-clamp" data-offset-x="10"> + <span></span><br><span></span><br><span></span> + </div> +</div> + + +<!-- Wrapping div --> +<div class="target" style="align-items: first baseline;"> + <div data-offset-x="105"><span></span></div> + <div class="line-clamp" data-offset-x="10"> + <div><span></span><br><span></span><br><span></span><br><span></span><br><span></span></div> + </div> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-x="25"><span></span></div> + <div class="line-clamp" data-offset-x="10"> + <div><span></span><br><span></span><br><span></span><br><span></span><br><span></span></div> + </div> +</div> + +<!-- Nested div after first line --> +<div class="target" style="align-items: first baseline;"> + <div data-offset-x="105"><span></span></div> + <div class="line-clamp" data-offset-x="10"> + <span></span><div><span></span><br><span></span><br><span></span><br><span></span></div> + </div> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-x="25"><span></span></div> + <div class="line-clamp" data-offset-x="10"> + <span></span><div><span></span><br><span></span><br><span></span><br><span></span></div> + </div> +</div> + +<!-- Block within inline. --> +<div class="target" style="align-items: first baseline;"> + <div data-offset-x="105"><span></span></div> + <div class="line-clamp" data-offset-x="10"> + <span></span><br><i><span></span><div><span></span><br><span></span><br><span></span></div></i> + </div> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-x="25"><span></span></div> + <div class="line-clamp" data-offset-x="10"> + <span></span><br><i><span></span><div><span></span><br><span></span><br><span></span></div></i> + </div> +</div> diff --git a/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-line-clamp-003.tentative.html b/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-line-clamp-003.tentative.html new file mode 100644 index 0000000000..20ab13ef5e --- /dev/null +++ b/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-line-clamp-003.tentative.html @@ -0,0 +1,129 @@ +<!DOCTYPE html> +<link rel="help" href="https://drafts.csswg.org/css-align-3/#valdef-justify-self-last-baseline"> +<style> +.target { + display: flex; + inline-size: 100px; + position: relative; + line-height: 0; + padding: 10px; + writing-mode: vertical-lr; +} +.target > div { + background: hotpink; + font-size: 30px; +} +.line-clamp { + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 3; + border: solid 10px; + font-size: 40px !important; + overflow: hidden; +} +.line-clamp div { + background: orange; +} +span { + display: inline-block; + width: 1em; + height: 1em; + outline: solid cyan 3px; + outline-offset: -3px; +} +</style> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> +<body onload="checkLayout('.target > *')"> + +<!-- Five lines --> +<div class="target" style="align-items: first baseline;"> + <div data-offset-x="25"><span></span></div> + <div class="line-clamp" data-offset-x="10"> + <span></span><br><span></span><br><span></span><br><span></span><br><span></span> + </div> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-x="105"><span></span></div> + <div class="line-clamp" data-offset-x="10"> + <span></span><br><span></span><br><span></span><br><span></span><br><span></span> + </div> +</div> + +<!-- Two lines --> +<div class="target" style="align-items: first baseline;"> + <div data-offset-x="25"><span></span></div> + <div class="line-clamp" data-offset-x="10"> + <span></span><br><span></span> + </div> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-x="65"><span></span></div> + <div class="line-clamp" data-offset-x="10"> + <span></span><br><span></span> + </div> +</div> + +<!-- Three lines --> +<div class="target" style="align-items: first baseline;"> + <div data-offset-x="25"><span></span></div> + <div class="line-clamp" data-offset-x="10"> + <span></span><br><span></span><br><span></span> + </div> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-x="105"><span></span></div> + <div class="line-clamp" data-offset-x="10"> + <span></span><br><span></span><br><span></span> + </div> +</div> + + +<!-- Wrapping div --> +<div class="target" style="align-items: first baseline;"> + <div data-offset-x="25"><span></span></div> + <div class="line-clamp" data-offset-x="10"> + <div><span></span><br><span></span><br><span></span><br><span></span><br><span></span></div> + </div> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-x="105"><span></span></div> + <div class="line-clamp" data-offset-x="10"> + <div><span></span><br><span></span><br><span></span><br><span></span><br><span></span></div> + </div> +</div> + +<!-- Nested div after first line --> +<div class="target" style="align-items: first baseline;"> + <div data-offset-x="25"><span></span></div> + <div class="line-clamp" data-offset-x="10"> + <span></span><div><span></span><br><span></span><br><span></span><br><span></span></div> + </div> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-x="105"><span></span></div> + <div class="line-clamp" data-offset-x="10"> + <span></span><div><span></span><br><span></span><br><span></span><br><span></span></div> + </div> +</div> + +<!-- Block within inline. --> +<div class="target" style="align-items: first baseline;"> + <div data-offset-x="25"><span></span></div> + <div class="line-clamp" data-offset-x="10"> + <span></span><br><i><span></span><div><span></span><br><span></span><br><span></span></div></i> + </div> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-x="105"><span></span></div> + <div class="line-clamp" data-offset-x="10"> + <span></span><br><i><span></span><div><span></span><br><span></span><br><span></span></div></i> + </div> +</div> diff --git a/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-multicol-001.html b/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-multicol-001.html new file mode 100644 index 0000000000..14db395889 --- /dev/null +++ b/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-multicol-001.html @@ -0,0 +1,142 @@ +<!DOCTYPE html> +<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/7639"> +<style> +.target { + display: flex; + inline-size: 100px; + position: relative; + line-height: 0; + padding: 10px; +} +.target > div { + background: hotpink; + font-size: 20px; +} +.multicol { + columns: 3; + column-fill: auto; + padding: 10px; + border: solid 10px; +} +.multicol > div { + break-inside: avoid; + break-before: column; + break-after: column; +} +span { + display: inline-block; + width: 1em; + height: 1em; + outline: solid cyan 3px; + outline-offset: -3px; +} +</style> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> +<body onload="checkLayout('.target > *')"> + +<!-- Three columns, largest in the middle. --> +<div class="target" style="align-items: first baseline;"> + <div data-offset-y="20"><span></span></div> + <div class="multicol" data-offset-y="10"> + <div style="font-size: 10px;"> + <span></span><br><span></span><br><span></span> + </div> + <div style="font-size: 30px;"> + <span></span><br><span></span><br><span></span> + </div> + <div style="font-size: 20px;"> + <span></span><br><span></span><br><span></span> + </div> + </div> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-y="100"><span></span></div> + <div class="multicol" data-offset-y="10"> + <div style="font-size: 10px;"> + <span></span><br><span></span><br><span></span> + </div> + <div style="font-size: 30px;"> + <span></span><br><span></span><br><span></span> + </div> + <div style="font-size: 20px;"> + <span></span><br><span></span><br><span></span> + </div> + </div> +</div> + +<!-- Start spanning element. --> +<div class="target" style="align-items: first baseline;"> + <div data-offset-y="30"><span></span></div> + <div class="multicol" data-offset-y="10"> + <div style="column-span: all; background: orange;"> + <span></span><br><span></span> + </div> + <div style="font-size: 10px;"> + <span></span><br><span></span><br><span></span> + </div> + <div style="font-size: 30px;"> + <span></span><br><span></span><br><span></span> + </div> + <div style="font-size: 20px;"> + <span></span><br><span></span><br><span></span> + </div> + </div> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-y="140"><span></span></div> + <div class="multicol" data-offset-y="10"> + <div style="column-span: all; background: orange;"> + <span></span><br><span></span> + </div> + <div style="font-size: 10px;"> + <span></span><br><span></span><br><span></span> + </div> + <div style="font-size: 30px;"> + <span></span><br><span></span><br><span></span> + </div> + <div style="font-size: 20px;"> + <span></span><br><span></span><br><span></span> + </div> + </div> +</div> + +<!-- End spanning element. --> +<div class="target" style="align-items: first baseline;"> + <div data-offset-y="20"><span></span></div> + <div class="multicol" data-offset-y="10"> + <div style="font-size: 10px;"> + <span></span><br><span></span><br><span></span> + </div> + <div style="font-size: 30px;"> + <span></span><br><span></span><br><span></span> + </div> + <div style="font-size: 20px;"> + <span></span><br><span></span><br><span></span> + </div> + <div style="column-span: all; background: orange;"> + <span></span><br><span></span> + </div> + </div> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-y="140"><span></span></div> + <div class="multicol" data-offset-y="10"> + <div style="font-size: 10px;"> + <span></span><br><span></span><br><span></span> + </div> + <div style="font-size: 30px;"> + <span></span><br><span></span><br><span></span> + </div> + <div style="font-size: 20px;"> + <span></span><br><span></span><br><span></span> + </div> + <div style="column-span: all; background: orange;"> + <span></span><br><span></span> + </div> + </div> +</div> diff --git a/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-multicol-002.html b/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-multicol-002.html new file mode 100644 index 0000000000..cf663a25dd --- /dev/null +++ b/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-multicol-002.html @@ -0,0 +1,144 @@ +<!DOCTYPE html> +<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/7639"> +<style> +.target { + display: flex; + inline-size: 200px; + position: relative; + line-height: 0; + margin: 40px; + padding: 10px; + writing-mode: vertical-rl; +} +.target > div { + background: hotpink; + font-size: 20px; +} +.multicol { + columns: 3; + column-fill: auto; + padding: 10px; + border: solid 10px; +} +.multicol > div { + break-inside: avoid; + break-before: column; + break-after: column; +} +span { + display: inline-block; + width: 1em; + height: 1em; + outline: solid cyan 3px; + outline-offset: -3px; +} +</style> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> +<body onload="checkLayout('.target > *')"> + +<!-- Three columns, largest in the middle. --> +<div class="target" style="align-items: first baseline;"> + <div data-offset-x="105"><span></span></div> + <div class="multicol" data-offset-x="10"> + <div style="font-size: 10px;"> + <span></span><br><span></span><br><span></span> + </div> + <div style="font-size: 30px;"> + <span></span><br><span></span><br><span></span> + </div> + <div style="font-size: 20px;"> + <span></span><br><span></span><br><span></span> + </div> + </div> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-x="35"><span></span></div> + <div class="multicol" data-offset-x="10"> + <div style="font-size: 10px;"> + <span></span><br><span></span><br><span></span> + </div> + <div style="font-size: 30px;"> + <span></span><br><span></span><br><span></span> + </div> + <div style="font-size: 20px;"> + <span></span><br><span></span><br><span></span> + </div> + </div> +</div> + +<!-- Start spanning element. --> +<div class="target" style="align-items: first baseline;"> + <div data-offset-x="140"><span></span></div> + <div class="multicol" data-offset-x="10"> + <div style="column-span: all; background: orange;"> + <span></span><br><span></span> + </div> + <div style="font-size: 10px;"> + <span></span><br><span></span><br><span></span> + </div> + <div style="font-size: 30px;"> + <span></span><br><span></span><br><span></span> + </div> + <div style="font-size: 20px;"> + <span></span><br><span></span><br><span></span> + </div> + </div> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-x="35"><span></span></div> + <div class="multicol" data-offset-x="10"> + <div style="column-span: all; background: orange;"> + <span></span><br><span></span> + </div> + <div style="font-size: 10px;"> + <span></span><br><span></span><br><span></span> + </div> + <div style="font-size: 30px;"> + <span></span><br><span></span><br><span></span> + </div> + <div style="font-size: 20px;"> + <span></span><br><span></span><br><span></span> + </div> + </div> +</div> + +<!-- End spanning element. --> +<div class="target" style="align-items: first baseline;"> + <div data-offset-x="145"><span></span></div> + <div class="multicol" data-offset-x="10"> + <div style="font-size: 10px;"> + <span></span><br><span></span><br><span></span> + </div> + <div style="font-size: 30px;"> + <span></span><br><span></span><br><span></span> + </div> + <div style="font-size: 20px;"> + <span></span><br><span></span><br><span></span> + </div> + <div style="column-span: all; background: orange;"> + <span></span><br><span></span> + </div> + </div> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-x="30"><span></span></div> + <div class="multicol" data-offset-x="10"> + <div style="font-size: 10px;"> + <span></span><br><span></span><br><span></span> + </div> + <div style="font-size: 30px;"> + <span></span><br><span></span><br><span></span> + </div> + <div style="font-size: 20px;"> + <span></span><br><span></span><br><span></span> + </div> + <div style="column-span: all; background: orange;"> + <span></span><br><span></span> + </div> + </div> +</div> diff --git a/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-multicol-003.html b/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-multicol-003.html new file mode 100644 index 0000000000..663c351ede --- /dev/null +++ b/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-multicol-003.html @@ -0,0 +1,144 @@ +<!DOCTYPE html> +<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/7639"> +<style> +.target { + display: flex; + inline-size: 200px; + position: relative; + line-height: 0; + margin: 40px; + padding: 10px; + writing-mode: vertical-lr; +} +.target > div { + background: hotpink; + font-size: 20px; +} +.multicol { + columns: 3; + column-fill: auto; + padding: 10px; + border: solid 10px; +} +.multicol > div { + break-inside: avoid; + break-before: column; + break-after: column; +} +span { + display: inline-block; + width: 1em; + height: 1em; + outline: solid cyan 3px; + outline-offset: -3px; +} +</style> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> +<body onload="checkLayout('.target > *')"> + +<!-- Three columns, largest in the middle. --> +<div class="target" style="align-items: first baseline;"> + <div data-offset-x="25"><span></span></div> + <div class="multicol" data-offset-x="10"> + <div style="font-size: 10px;"> + <span></span><br><span></span><br><span></span> + </div> + <div style="font-size: 30px;"> + <span></span><br><span></span><br><span></span> + </div> + <div style="font-size: 20px;"> + <span></span><br><span></span><br><span></span> + </div> + </div> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-x="95"><span></span></div> + <div class="multicol" data-offset-x="10"> + <div style="font-size: 10px;"> + <span></span><br><span></span><br><span></span> + </div> + <div style="font-size: 30px;"> + <span></span><br><span></span><br><span></span> + </div> + <div style="font-size: 20px;"> + <span></span><br><span></span><br><span></span> + </div> + </div> +</div> + +<!-- Start spanning element. --> +<div class="target" style="align-items: first baseline;"> + <div data-offset-x="30"><span></span></div> + <div class="multicol" data-offset-x="10"> + <div style="column-span: all; background: orange;"> + <span></span><br><span></span> + </div> + <div style="font-size: 10px;"> + <span></span><br><span></span><br><span></span> + </div> + <div style="font-size: 30px;"> + <span></span><br><span></span><br><span></span> + </div> + <div style="font-size: 20px;"> + <span></span><br><span></span><br><span></span> + </div> + </div> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-x="135"><span></span></div> + <div class="multicol" data-offset-x="10"> + <div style="column-span: all; background: orange;"> + <span></span><br><span></span> + </div> + <div style="font-size: 10px;"> + <span></span><br><span></span><br><span></span> + </div> + <div style="font-size: 30px;"> + <span></span><br><span></span><br><span></span> + </div> + <div style="font-size: 20px;"> + <span></span><br><span></span><br><span></span> + </div> + </div> +</div> + +<!-- End spanning element. --> +<div class="target" style="align-items: first baseline;"> + <div data-offset-x="25"><span></span></div> + <div class="multicol" data-offset-x="10"> + <div style="font-size: 10px;"> + <span></span><br><span></span><br><span></span> + </div> + <div style="font-size: 30px;"> + <span></span><br><span></span><br><span></span> + </div> + <div style="font-size: 20px;"> + <span></span><br><span></span><br><span></span> + </div> + <div style="column-span: all; background: orange;"> + <span></span><br><span></span> + </div> + </div> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-x="140"><span></span></div> + <div class="multicol" data-offset-x="10"> + <div style="font-size: 10px;"> + <span></span><br><span></span><br><span></span> + </div> + <div style="font-size: 30px;"> + <span></span><br><span></span><br><span></span> + </div> + <div style="font-size: 20px;"> + <span></span><br><span></span><br><span></span> + </div> + <div style="column-span: all; background: orange;"> + <span></span><br><span></span> + </div> + </div> +</div> diff --git a/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-overflow-001.html b/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-overflow-001.html new file mode 100644 index 0000000000..382112ed21 --- /dev/null +++ b/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-overflow-001.html @@ -0,0 +1,90 @@ +<!DOCTYPE html> +<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/7660"> +<style> +.target { + display: flex; + position: relative; + line-height: 0; + font-size: 20px; + inline-size: 300px; + margin-block: 10px; + padding: 10px; + border: solid 3px; +} + +.inner { + overflow: hidden; + inline-size: 100px; + block-size: 80px; + margin: 10px; + border: solid 5px; + padding: 10px; + font-size: 30px; +} + +span { + display: inline-block; + width: 1em; + height: 1em; + outline: solid cyan 3px; + outline-offset: -3px; +} +</style> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> +<body onload="checkLayout('.target > *')"> + +<div class="target" style="align-items: first baseline;"> + <div data-offset-y="45"><span></span><br><span></span></div> + <div class="inner" data-offset-y="20"> + <div> + <span></span><br><span></span> + </div> + </div> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-y="55"><span></span><br><span></span></div> + <div class="inner" data-offset-y="20"> + <div> + <span></span><br><span></span> + </div> + </div> +</div> + +<div class="target" style="align-items: first baseline;"> + <div data-offset-y="10"><span></span><br><span></span></div> + <div class="inner" data-offset-y="30"> + <div style="margin-block-start: -200px;"> + <span></span><br><span></span> + </div> + </div> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-y="10"><span></span><br><span></span></div> + <div class="inner" data-offset-y="50"> + <div style="margin-block-start: -200px;"> + <span></span><br><span></span> + </div> + </div> +</div> + +<div class="target" style="align-items: first baseline;"> + <div data-offset-y="110"><span></span><br><span></span></div> + <div class="inner" data-offset-y="20"> + <div style="margin-block-start: 200px;"> + <span></span><br><span></span> + </div> + </div> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-y="90"><span></span><br><span></span></div> + <div class="inner" data-offset-y="20"> + <div style="margin-block-start: 200px;"> + <span></span><br><span></span> + </div> + </div> +</div> diff --git a/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-overflow-002.html b/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-overflow-002.html new file mode 100644 index 0000000000..d136159246 --- /dev/null +++ b/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-overflow-002.html @@ -0,0 +1,91 @@ +<!DOCTYPE html> +<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/7660"> +<style> +.target { + display: flex; + position: relative; + line-height: 0; + font-size: 20px; + inline-size: 300px; + margin-block: 10px; + padding: 10px; + border: solid 3px; + writing-mode: vertical-rl; +} + +.inner { + overflow: hidden; + inline-size: 100px; + block-size: 80px; + margin: 10px; + border: solid 5px; + padding: 10px; + font-size: 30px; +} + +span { + display: inline-block; + width: 1em; + height: 1em; + outline: solid cyan 3px; + outline-offset: -3px; +} +</style> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> +<body onload="checkLayout('.target > *')"> + +<div class="target" style="align-items: first baseline;"> + <div data-offset-x="70"><span></span><br><span></span></div> + <div class="inner" data-offset-x="20"> + <div> + <span></span><br><span></span> + </div> + </div> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-x="60"><span></span><br><span></span></div> + <div class="inner" data-offset-x="20"> + <div> + <span></span><br><span></span> + </div> + </div> +</div> + +<div class="target" style="align-items: first baseline;"> + <div data-offset-x="100"><span></span><br><span></span></div> + <div class="inner" data-offset-x="20"> + <div style="margin-block-start: -200px;"> + <span></span><br><span></span> + </div> + </div> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-x="120"><span></span><br><span></span></div> + <div class="inner" data-offset-x="20"> + <div style="margin-block-start: -200px;"> + <span></span><br><span></span> + </div> + </div> +</div> + +<div class="target" style="align-items: first baseline;"> + <div data-offset-x="10"><span></span><br><span></span></div> + <div class="inner" data-offset-x="40"> + <div style="margin-block-start: 200px;"> + <span></span><br><span></span> + </div> + </div> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-x="10"><span></span><br><span></span></div> + <div class="inner" data-offset-x="20"> + <div style="margin-block-start: 200px;"> + <span></span><br><span></span> + </div> + </div> +</div> diff --git a/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-overflow-003.html b/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-overflow-003.html new file mode 100644 index 0000000000..37d9ea26fd --- /dev/null +++ b/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-overflow-003.html @@ -0,0 +1,91 @@ +<!DOCTYPE html> +<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/7660"> +<style> +.target { + display: flex; + position: relative; + line-height: 0; + font-size: 20px; + inline-size: 300px; + margin-block: 10px; + padding: 10px; + border: solid 3px; + writing-mode: vertical-lr; +} + +.inner { + overflow: hidden; + inline-size: 100px; + block-size: 80px; + margin: 10px; + border: solid 5px; + padding: 10px; + font-size: 30px; +} + +span { + display: inline-block; + width: 1em; + height: 1em; + outline: solid cyan 3px; + outline-offset: -3px; +} +</style> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> +<body onload="checkLayout('.target > *')"> + +<div class="target" style="align-items: first baseline;"> + <div data-offset-x="40"><span></span><br><span></span></div> + <div class="inner" data-offset-x="20"> + <div> + <span></span><br><span></span> + </div> + </div> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-x="50"><span></span><br><span></span></div> + <div class="inner" data-offset-x="20"> + <div> + <span></span><br><span></span> + </div> + </div> +</div> + +<div class="target" style="align-items: first baseline;"> + <div data-offset-x="10"><span></span><br><span></span></div> + <div class="inner" data-offset-x="20"> + <div style="margin-block-start: -200px;"> + <span></span><br><span></span> + </div> + </div> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-x="10"><span></span><br><span></span></div> + <div class="inner" data-offset-x="40"> + <div style="margin-block-start: -200px;"> + <span></span><br><span></span> + </div> + </div> +</div> + +<div class="target" style="align-items: first baseline;"> + <div data-offset-x="120"><span></span><br><span></span></div> + <div class="inner" data-offset-x="20"> + <div style="margin-block-start: 200px;"> + <span></span><br><span></span> + </div> + </div> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-x="100"><span></span><br><span></span></div> + <div class="inner" data-offset-x="20"> + <div style="margin-block-start: 200px;"> + <span></span><br><span></span> + </div> + </div> +</div> diff --git a/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-table-001.html b/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-table-001.html new file mode 100644 index 0000000000..7f9a9d5fca --- /dev/null +++ b/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-table-001.html @@ -0,0 +1,95 @@ +<!DOCTYPE html> +<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/7655#issuecomment-1248528627"> +<style> +.target { + display: flex; + position: relative; +} +.target > div, .target td { + background: hotpink; + font-size: 20px; + line-height: 0; +} +.target table { border-spacing: 0; } +.target td { padding: 5px; min-width: 5px; min-height: 5px; } +.target caption { + margin: 10px; + background: lime; + block-size: 20px; +} +.target span { + display: inline-block; + width: 1em; + height: 1em; + outline: solid cyan 3px; + outline-offset: -3px; +} +</style> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> +<body onload="checkLayout('.target > *')"> + +<div class="target" style="align-items: first baseline;"> + <div data-offset-y="45"><span></span></div> + <table data-offset-y="0"> + <caption>top</caption> + <tr style="vertical-align: baseline;"> + <td style="font-size: 10px;"><span></span><br><span></span></td> + <td><span></span><br><span></span></td> + </tr> + <tr style="vertical-align: baseline;"> + <td><span></span><br><span></span></td> + <td style="font-size: 10px;"><span></span><br><span></span></td> + </tr> + <caption style="caption-side: bottom;">bottom</caption> + </table> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-y="95"><span></span></div> + <table data-offset-y="0"> + <caption>top</caption> + <tr style="vertical-align: baseline;"> + <td style="font-size: 10px;"><span></span><br><span></span></td> + <td><span></span><br><span></span></td> + </tr> + <tr style="vertical-align: baseline;"> + <td><span></span><br><span></span></td> + <td style="font-size: 10px;"><span></span><br><span></span></td> + </tr> + <caption style="caption-side: bottom;">bottom</caption> + </table> +</div> + +<div class="target" style="align-items: first baseline;"> + <div data-offset-y="20"><span></span></div> + <table data-offset-y="0"> + <tr> + <td style="border: solid 10px;"></td> + <td style="border: solid 5px;"></td> + <td style="border: solid 20px;"></td> + </tr> + <tr> + <td style="border: solid 10px;"></td> + <td style="border: solid 5px;"></td> + <td style="border: solid 20px;"></td> + </tr> + </table> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-y="70"><span></span></div> + <table data-offset-y="0"> + <tr> + <td style="border: solid 10px;"></td> + <td style="border: solid 5px;"></td> + <td style="border: solid 20px;"></td> + </tr> + <tr> + <td style="border: solid 10px;"></td> + <td style="border: solid 5px;"></td> + <td style="border: solid 20px;"></td> + </tr> + </table> +</div> diff --git a/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-table-002.html b/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-table-002.html new file mode 100644 index 0000000000..80a3d22a03 --- /dev/null +++ b/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-table-002.html @@ -0,0 +1,64 @@ +<!DOCTYPE html> +<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/7655#issuecomment-1248528627"> +<style> +.target { + display: flex; + position: relative; + writing-mode: vertical-rl; +} +.target > div, .target td { + background: hotpink; + font-size: 20px; + line-height: 0; +} +.target table { border-spacing: 0; } +.target td { padding: 5px; min-width: 5px; min-height: 5px; } +.target caption { + margin: 10px; + background: lime; + block-size: 20px; +} +.target span { + display: inline-block; + width: 1em; + height: 1em; + outline: solid cyan 3px; + outline-offset: -3px; +} +</style> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> +<body onload="checkLayout('.target > *')"> + +<div class="target" style="align-items: first baseline;"> + <div data-offset-x="115"><span></span></div> + <table data-offset-x="0"> + <caption>top</caption> + <tr style="vertical-align: baseline;"> + <td style="font-size: 10px;"><span></span><br><span></span></td> + <td><span></span><br><span></span></td> + </tr> + <tr style="vertical-align: baseline;"> + <td><span></span><br><span></span></td> + <td style="font-size: 10px;"><span></span><br><span></span></td> + </tr> + <caption style="caption-side: bottom;">bottom</caption> + </table> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-x="65"><span></span></div> + <table data-offset-x="0"> + <caption>top</caption> + <tr style="vertical-align: baseline;"> + <td style="font-size: 10px;"><span></span><br><span></span></td> + <td><span></span><br><span></span></td> + </tr> + <tr style="vertical-align: baseline;"> + <td><span></span><br><span></span></td> + <td style="font-size: 10px;"><span></span><br><span></span></td> + </tr> + <caption style="caption-side: bottom;">bottom</caption> + </table> +</div> diff --git a/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-table-003.html b/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-table-003.html new file mode 100644 index 0000000000..07bc4d709c --- /dev/null +++ b/testing/web-platform/tests/css/css-flexbox/alignment/flex-align-baseline-table-003.html @@ -0,0 +1,64 @@ +<!DOCTYPE html> +<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/7655#issuecomment-1248528627"> +<style> +.target { + display: flex; + position: relative; + writing-mode: vertical-lr; +} +.target > div, .target td { + background: hotpink; + font-size: 20px; + line-height: 0; +} +.target table { border-spacing: 0; } +.target td { padding: 5px; min-width: 5px; min-height: 5px; } +.target caption { + margin: 10px; + background: lime; + block-size: 20px; +} +.target span { + display: inline-block; + width: 1em; + height: 1em; + outline: solid cyan 3px; + outline-offset: -3px; +} +</style> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> +<body onload="checkLayout('.target > *')"> + +<div class="target" style="align-items: first baseline;"> + <div data-offset-x="45"><span></span></div> + <table data-offset-x="0"> + <caption>top</caption> + <tr style="vertical-align: baseline;"> + <td style="font-size: 10px;"><span></span><br><span></span></td> + <td><span></span><br><span></span></td> + </tr> + <tr style="vertical-align: baseline;"> + <td><span></span><br><span></span></td> + <td style="font-size: 10px;"><span></span><br><span></span></td> + </tr> + <caption style="caption-side: bottom;">bottom</caption> + </table> +</div> + +<div class="target" style="align-items: last baseline;"> + <div data-offset-x="95"><span></span></div> + <table data-offset-x="0"> + <caption>top</caption> + <tr style="vertical-align: baseline;"> + <td style="font-size: 10px;"><span></span><br><span></span></td> + <td><span></span><br><span></span></td> + </tr> + <tr style="vertical-align: baseline;"> + <td><span></span><br><span></span></td> + <td style="font-size: 10px;"><span></span><br><span></span></td> + </tr> + <caption style="caption-side: bottom;">bottom</caption> + </table> +</div> |