summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-flexbox/fit-content-item-002.html
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:22:09 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:22:09 +0000
commit43a97878ce14b72f0981164f87f2e35e14151312 (patch)
tree620249daf56c0258faa40cbdcf9cfba06de2a846 /testing/web-platform/tests/css/css-flexbox/fit-content-item-002.html
parentInitial commit. (diff)
downloadfirefox-43a97878ce14b72f0981164f87f2e35e14151312.tar.xz
firefox-43a97878ce14b72f0981164f87f2e35e14151312.zip
Adding upstream version 110.0.1.upstream/110.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/css/css-flexbox/fit-content-item-002.html')
-rw-r--r--testing/web-platform/tests/css/css-flexbox/fit-content-item-002.html41
1 files changed, 41 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-flexbox/fit-content-item-002.html b/testing/web-platform/tests/css/css-flexbox/fit-content-item-002.html
new file mode 100644
index 0000000000..c1be5ff5a9
--- /dev/null
+++ b/testing/web-platform/tests/css/css-flexbox/fit-content-item-002.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<link rel="author" title="David Grogan" href="mailto:dgrogan@chromium.org">
+<link rel="help" href="https://drafts.csswg.org/css-flexbox/#flex-base-size">
+<link rel="match" href="../reference/ref-filled-green-100px-square-only.html">
+<meta name="assert" content="A flex container's block cross size of min-content is treated as indefinite when setting fit-content on an item for flex base sizing">
+
+<style>
+x-flexbox {
+ display: flex;
+ height: min-content;
+}
+
+.fit-content-item {
+ background: green;
+ width: 100px;
+ writing-mode: vertical-lr;
+}
+
+.height-setting-item {
+ height: 100px;
+}
+
+</style>
+
+<!-- This has to be a row flexbox whose item stretches and has vertical writing
+ mode to trigger:
+ * a cross size is needed to determine the main size (row flexbox's cross size
+ is vertical, which is the item's inline size because it has a vertical
+ writing mode)
+ * the flex item’s cross size is [...] not definite (if the item didn't
+ stretch, the definiteness of the container's cross size wouldn't matter
+ because the cross size would never be definite and the item would always get
+ fit-content)
+-->
+
+<p>Test passes if there is a filled green square.</p>
+
+<x-flexbox>
+ <div class="fit-content-item"></div>
+ <div class="height-setting-item"></div>
+</x-flexbox>