diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:22:09 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:22:09 +0000 |
commit | 43a97878ce14b72f0981164f87f2e35e14151312 (patch) | |
tree | 620249daf56c0258faa40cbdcf9cfba06de2a846 /testing/web-platform/tests/css/css-grid/grid-definition/flex-content-distribution-001.html | |
parent | Initial commit. (diff) | |
download | firefox-43a97878ce14b72f0981164f87f2e35e14151312.tar.xz firefox-43a97878ce14b72f0981164f87f2e35e14151312.zip |
Adding upstream version 110.0.1.upstream/110.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/css/css-grid/grid-definition/flex-content-distribution-001.html')
-rw-r--r-- | testing/web-platform/tests/css/css-grid/grid-definition/flex-content-distribution-001.html | 87 |
1 files changed, 87 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-grid/grid-definition/flex-content-distribution-001.html b/testing/web-platform/tests/css/css-grid/grid-definition/flex-content-distribution-001.html new file mode 100644 index 0000000000..62fb46deeb --- /dev/null +++ b/testing/web-platform/tests/css/css-grid/grid-definition/flex-content-distribution-001.html @@ -0,0 +1,87 @@ +<!DOCTYPE html> +<title>CSS Grid Layout Test: free space computation with flex lengths.</title> +<link rel="author" title="Sergio Villar Senin" href="mailto:svillar@igalia.com"> +<link rel="help" href="https://drafts.csswg.org/css-grid-1/#algo-flex-tracks"> +<link rel="help" href="https://drafts.csswg.org/css-grid-1/#fr-unit"> +<link rel="help" href="https://bugs.webkit.org/show_bug.cgi?id=150359"> +<link rel="stylesheet" href="/css/support/grid.css"> +<link rel="stylesheet" href="/css/support/alignment.css"> +<meta name="assert" content="Test that free space is properly computed after computing fr tracks so that we could use it for content distribution." /> + +<style> +.freeSpaceForColumnsGrid { + grid-template: 100% / minmax(20px, 0.7fr); + width: 50px; + height: 100px; +} + +.freeSpaceForRowsGrid { + grid-template: minmax(20px, 0.7fr) / 100%; + width: 50px; + height: 100px; +} + +.container { position: relative; } + +.item { + width: 100%; + height: 50px; + background-color: red; +} + +.item2 { + width: 50px; + height: 100%; + background-color: red; +} + +</style> + +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> + +<body onload="checkLayout('.grid');"> + +<p>Grid with justify-content: start.</p> +<div class="container"> + <div class="grid freeSpaceForColumnsGrid justifyContentStart"> + <div class="item" data-offset-x="0" data-offset-y="0" data-expected-width="35" data-expected-height="50"></div> + </div> +</div> + +<p>Grid with justify-content: center.</p> +<div class="container"> + <div class="grid freeSpaceForColumnsGrid justifyContentCenter"> + <div class="item" data-offset-x="8" data-offset-y="0" data-expected-width="35" data-expected-height="50"></div> + </div> +</div> + +<p>Grid with justify-content: end.</p> +<div class="container"> + <div class="grid freeSpaceForColumnsGrid justifyContentEnd"> + <div class="item" data-offset-x="15" data-offset-y="0" data-expected-width="35" data-expected-height="50"></div> + </div> +</div> + +<p>Grid with align-content: start.</p> +<div class="container"> + <div class="grid freeSpaceForRowsGrid alignContentStart"> + <div class="item2" data-offset-x="0" data-offset-y="0" data-expected-width="50" data-expected-height="70"></div> + </div> +</div> + +<p>Grid with align-content: center.</p> +<div class="container"> + <div class="grid freeSpaceForRowsGrid alignContentCenter"> + <div class="item2" data-offset-x="0" data-offset-y="15" data-expected-width="50" data-expected-height="70"></div> + </div> +</div> + +<p>Grid with align-content: end.</p> +<div class="container"> + <div class="grid freeSpaceForRowsGrid alignContentEnd"> + <div class="item2" data-offset-x="0" data-offset-y="30" data-expected-width="50" data-expected-height="70"></div> + </div> +</div> +</body> |