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-grid/grid-items/grid-minimum-size-grid-items-024.html | |
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-grid/grid-items/grid-minimum-size-grid-items-024.html')
-rw-r--r-- | testing/web-platform/tests/css/css-grid/grid-items/grid-minimum-size-grid-items-024.html | 359 |
1 files changed, 359 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-grid/grid-items/grid-minimum-size-grid-items-024.html b/testing/web-platform/tests/css/css-grid/grid-items/grid-minimum-size-grid-items-024.html new file mode 100644 index 0000000000..fc7c91dbf1 --- /dev/null +++ b/testing/web-platform/tests/css/css-grid/grid-items/grid-minimum-size-grid-items-024.html @@ -0,0 +1,359 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS Grid Layout Test: Minimum size of grid items</title> +<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com"> +<link rel="help" href="http://www.w3.org/TR/css-grid-1/#min-size-auto" title="6.5. Implied Minimum Size of Grid Items"> +<meta name="assert" content="Checks that automatic minimum size is clamped with different column sizes and spaning items."> +<link rel="stylesheet" href="/css/support/grid.css"> +<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> +<style> +.grid { + border: solid thick; + font: 10px/1 Ahem; + width: 50px; + height: 50px; + grid-template-rows: 25px 25px; +} + +.grid > div { + grid-column: span 2; +} + +.grid > div:nth-child(1) { + color: blue; + background: cyan; +} + +.grid > div:nth-child(2) { + background: magenta; +} +</style> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> +<script type="text/javascript"> + setup({ explicit_done: true }); +</script> + +<body onload="document.fonts.ready.then(() => { checkLayout('.grid'); })"> + +<div id="log"></div> + +<pre>grid-template-columns: auto auto;</pre> + +<div class="grid" style="grid-template-columns: auto auto;"> + <div data-expected-width="100">XXXXXXXXXX</div> + <div data-expected-width="100"></div> +</div> + +<pre>grid-template-columns: 0px 0px;</pre> + +<div class="grid" style="grid-template-columns: 0px 0px;"> + <div data-expected-width="0">XXXXXXXXXX</div> + <div data-expected-width="0"></div> +</div> + +<pre>grid-template-columns: 20px 20px;</pre> + +<div class="grid" style="grid-template-columns: 20px 20px;"> + <div data-expected-width="40">XXXXXXXXXX</div> + <div data-expected-width="40"></div> +</div> + +<pre>grid-template-columns: minmax(auto, 0px) minmax(auto, 0px);</pre> + +<div class="grid" style="grid-template-columns: minmax(auto, 0px) minmax(auto, 0px);"> + <div data-expected-width="0">XXXXXXXXXX</div> + <div data-expected-width="0"></div> +</div> + +<pre>grid-template-columns: minmax(auto, 20px) minmax(auto, 20px);</pre> + +<div class="grid" style="grid-template-columns: minmax(auto, 20px) minmax(auto, 20px);"> + <div data-expected-width="40">XXXXXXXXXX</div> + <div data-expected-width="40"></div> +</div> + +<pre>grid-template-columns: minmax(auto, 0px) minmax(auto, 0px); item width: 10px;</pre> + +<div class="grid" style="grid-template-columns: minmax(auto, 0px) minmax(auto, 0px);"> + <div data-expected-width="10" style="width: 10px;">XXXXXXXXXX</div> + <div data-expected-width="10"></div> +</div> + +<pre>grid-template-columns: minmax(auto, 20px) minmax(auto, 20px); item width: 10px;</pre> + +<div class="grid" style="grid-template-columns: minmax(auto, 20px) minmax(auto, 20px);"> + <div data-expected-width="10" style="width: 10px;">XXXXXXXXXX</div> + <div data-expected-width="40"></div> +</div> + +<pre>grid-template-columns: minmax(auto, 0px) minmax(auto, 0px); item margin width: 10px;</pre> + +<div class="grid" style="grid-template-columns: minmax(auto, 0px) minmax(auto, 0px);"> + <div data-expected-width="0" style="margin: 0px 5px;"></div> + <div data-expected-width="10"></div> +</div> + +<pre>grid-template-columns: minmax(auto, 20px) minmax(auto, 20px); item margin width: 10px;</pre> + +<div class="grid" style="grid-template-columns: minmax(auto, 20px) minmax(auto, 20px);"> + <div data-expected-width="30" style="margin: 0px 5px;"></div> + <div data-expected-width="40"></div> +</div> + +<pre>grid-template-columns: minmax(auto, 0px) minmax(auto, 0px); item padding width: 10px;</pre> + +<div class="grid" style="grid-template-columns: minmax(auto, 0px) minmax(auto, 0px);"> + <div data-expected-width="10" style="padding: 0px 5px;"></div> + <div data-expected-width="10"></div> +</div> + +<pre>grid-template-columns: minmax(auto, 20px) minmax(auto, 20px); item padding width: 10px;</pre> + +<div class="grid" style="grid-template-columns: minmax(auto, 20px) minmax(auto, 20px);"> + <div data-expected-width="40" style="padding: 0px 5px;"></div> + <div data-expected-width="40"></div> +</div> + +<pre>grid-template-columns: minmax(auto, 0px) minmax(auto, 0px); item border width: 10px;</pre> + +<div class="grid" style="grid-template-columns: minmax(auto, 0px) minmax(auto, 0px);"> + <div data-expected-width="10" style="border: solid 5px blue;"></div> + <div data-expected-width="10"></div> +</div> + +<pre>grid-template-columns: minmax(auto, 20px) minmax(auto, 20px); item border width: 10px;</pre> + +<div class="grid" style="grid-template-columns: minmax(auto, 20px) minmax(auto, 20px);"> + <div data-expected-width="40" style="border: solid 5px blue;"></div> + <div data-expected-width="40"></div> +</div> + +<pre>grid-template-columns: minmax(auto, 0px) minmax(auto, 0px); item width + margin + border + padding: 10px;</pre> + +<div class="grid" style="grid-template-columns: minmax(auto, 0px) minmax(auto, 0px);"> + <div data-expected-width="8" style="width: 4px; margin: 1px; padding: 1px; border: solid 1px blue;"></div> + <div data-expected-width="10"></div> +</div> + +<pre>grid-template-columns: minmax(auto, 20px) minmax(auto, 20px); item width + margin + border + padding: 10px;</pre> + +<div class="grid" style="grid-template-columns: minmax(auto, 20px) minmax(auto, 20px);"> + <div data-expected-width="8" style="width: 4px; margin: 1px; padding: 1px; border: solid 1px blue;"></div> + <div data-expected-width="40"></div> +</div> + +<h3>grid content writing-mode: vertical-lr;</h3> + +<pre>grid-template-columns: auto auto;</pre> + +<div class="grid verticalLR" style="grid-template-columns: auto auto;"> + <div data-expected-height="100">XXXXXXXXXX</div> + <div data-expected-height="100"></div> +</div> + +<pre>grid-template-columns: 0px 0px;</pre> + +<div class="grid verticalLR" style="grid-template-columns: 0px 0px;"> + <div data-expected-height="0">XXXXXXXXXX</div> + <div data-expected-height="0"></div> +</div> + +<pre>grid-template-columns: 20px 20px;</pre> + +<div class="grid verticalLR" style="grid-template-columns: 20px 20px;"> + <div data-expected-height="40">XXXXXXXXXX</div> + <div data-expected-height="40"></div> +</div> + +<pre>grid-template-columns: minmax(auto, 0px) minmax(auto, 0px);</pre> + +<div class="grid verticalLR" style="grid-template-columns: minmax(auto, 0px) minmax(auto, 0px);"> + <div data-expected-height="0">XXXXXXXXXX</div> + <div data-expected-height="0"></div> +</div> + +<pre>grid-template-columns: minmax(auto, 20px) minmax(auto, 20px);</pre> + +<div class="grid verticalLR" style="grid-template-columns: minmax(auto, 20px) minmax(auto, 20px);"> + <div data-expected-height="40">XXXXXXXXXX</div> + <div data-expected-height="40"></div> +</div> + +<pre>grid-template-columns: minmax(auto, 0px) minmax(auto, 0px); item height: 10px;</pre> + +<div class="grid verticalLR" style="grid-template-columns: minmax(auto, 0px) minmax(auto, 0px);"> + <div data-expected-height="10" style="height: 10px;">XXXXXXXXXX</div> + <div data-expected-height="10"></div> +</div> + +<pre>grid-template-columns: minmax(auto, 20px) minmax(auto, 20px); item height: 10px;</pre> + +<div class="grid verticalLR" style="grid-template-columns: minmax(auto, 20px) minmax(auto, 20px);"> + <div data-expected-height="10" style="height: 10px;">XXXXXXXXXX</div> + <div data-expected-height="40"></div> +</div> + +<pre>grid-template-columns: minmax(auto, 0px) minmax(auto, 0px); item margin height: 10px;</pre> + +<div class="grid verticalLR" style="grid-template-columns: minmax(auto, 0px) minmax(auto, 0px);"> + <div data-expected-height="0" style="margin: 5px 0px;"></div> + <div data-expected-height="10"></div> +</div> + +<pre>grid-template-columns: minmax(auto, 20px) minmax(auto, 20px); item margin height: 10px;</pre> + +<div class="grid verticalLR" style="grid-template-columns: minmax(auto, 20px) minmax(auto, 20px);"> + <div data-expected-height="30" style="margin: 5px 0px;"></div> + <div data-expected-height="40"></div> +</div> + +<pre>grid-template-columns: minmax(auto, 0px) minmax(auto, 0px); item padding height: 10px;</pre> + +<div class="grid verticalLR" style="grid-template-columns: minmax(auto, 0px) minmax(auto, 0px);"> + <div data-expected-height="10" style="padding: 5px 0px;"></div> + <div data-expected-height="10"></div> +</div> + +<pre>grid-template-columns: minmax(auto, 20px) minmax(auto, 20px); item padding height: 10px;</pre> + +<div class="grid verticalLR" style="grid-template-columns: minmax(auto, 20px) minmax(auto, 20px);"> + <div data-expected-height="40" style="padding: 5px 0px;"></div> + <div data-expected-height="40"></div> +</div> + +<pre>grid-template-columns: minmax(auto, 0px) minmax(auto, 0px); item border height: 10px;</pre> + +<div class="grid verticalLR" style="grid-template-columns: minmax(auto, 0px) minmax(auto, 0px);"> + <div data-expected-height="10" style="border: solid 5px blue;"></div> + <div data-expected-height="10"></div> +</div> + +<pre>grid-template-columns: minmax(auto, 20px) minmax(auto, 20px); item border height: 10px;</pre> + +<div class="grid verticalLR" style="grid-template-columns: minmax(auto, 20px) minmax(auto, 20px);"> + <div data-expected-height="40" style="border: solid 5px blue;"></div> + <div data-expected-height="40"></div> +</div> + +<pre>grid-template-columns: minmax(auto, 0px) minmax(auto, 0px); item height + margin + border + padding: 10px;</pre> + +<div class="grid verticalLR" style="grid-template-columns: minmax(auto, 0px) minmax(auto, 0px);"> + <div data-expected-height="8" style="height: 4px; margin: 1px; padding: 1px; border: solid 1px blue;"></div> + <div data-expected-height="10"></div> +</div> + +<pre>grid-template-columns: minmax(auto, 20px) minmax(auto, 20px); item height + margin + border + padding: 10px;</pre> + +<div class="grid verticalLR" style="grid-template-columns: minmax(auto, 20px) minmax(auto, 20px);"> + <div data-expected-height="8" style="height: 4px; margin: 1px; padding: 1px; border: solid 1px blue;"></div> + <div data-expected-height="40"></div> +</div> + +<h3>grid content writing-mode: vertical-rl;</h3> + +<pre>grid-template-columns: auto auto;</pre> + +<div class="grid verticalRL" style="grid-template-columns: auto auto;"> + <div data-expected-height="100">XXXXXXXXXX</div> + <div data-expected-height="100"></div> +</div> + +<pre>grid-template-columns: 0px 0px;</pre> + +<div class="grid verticalRL" style="grid-template-columns: 0px 0px;"> + <div data-expected-height="0">XXXXXXXXXX</div> + <div data-expected-height="0"></div> +</div> + +<pre>grid-template-columns: 20px 20px;</pre> + +<div class="grid verticalRL" style="grid-template-columns: 20px 20px;"> + <div data-expected-height="40">XXXXXXXXXX</div> + <div data-expected-height="40"></div> +</div> + +<pre>grid-template-columns: minmax(auto, 0px) minmax(auto, 0px);</pre> + +<div class="grid verticalRL" style="grid-template-columns: minmax(auto, 0px) minmax(auto, 0px);"> + <div data-expected-height="0">XXXXXXXXXX</div> + <div data-expected-height="0"></div> +</div> + +<pre>grid-template-columns: minmax(auto, 20px) minmax(auto, 20px);</pre> + +<div class="grid verticalRL" style="grid-template-columns: minmax(auto, 20px) minmax(auto, 20px);"> + <div data-expected-height="40">XXXXXXXXXX</div> + <div data-expected-height="40"></div> +</div> + +<pre>grid-template-columns: minmax(auto, 0px) minmax(auto, 0px); item height: 10px;</pre> + +<div class="grid verticalRL" style="grid-template-columns: minmax(auto, 0px) minmax(auto, 0px);"> + <div data-expected-height="10" style="height: 10px;">XXXXXXXXXX</div> + <div data-expected-height="10"></div> +</div> + +<pre>grid-template-columns: minmax(auto, 20px) minmax(auto, 20px); item height: 10px;</pre> + +<div class="grid verticalRL" style="grid-template-columns: minmax(auto, 20px) minmax(auto, 20px);"> + <div data-expected-height="10" style="height: 10px;">XXXXXXXXXX</div> + <div data-expected-height="40"></div> +</div> + +<pre>grid-template-columns: minmax(auto, 0px) minmax(auto, 0px); item margin height: 10px;</pre> + +<div class="grid verticalRL" style="grid-template-columns: minmax(auto, 0px) minmax(auto, 0px);"> + <div data-expected-height="0" style="margin: 5px 0px;"></div> + <div data-expected-height="10"></div> +</div> + +<pre>grid-template-columns: minmax(auto, 20px) minmax(auto, 20px); item margin height: 10px;</pre> + +<div class="grid verticalRL" style="grid-template-columns: minmax(auto, 20px) minmax(auto, 20px);"> + <div data-expected-height="30" style="margin: 5px 0px;"></div> + <div data-expected-height="40"></div> +</div> + +<pre>grid-template-columns: minmax(auto, 0px) minmax(auto, 0px); item padding height: 10px;</pre> + +<div class="grid verticalRL" style="grid-template-columns: minmax(auto, 0px) minmax(auto, 0px);"> + <div data-expected-height="10" style="padding: 5px 0px;"></div> + <div data-expected-height="10"></div> +</div> + +<pre>grid-template-columns: minmax(auto, 20px) minmax(auto, 20px); item padding height: 10px;</pre> + +<div class="grid verticalRL" style="grid-template-columns: minmax(auto, 20px) minmax(auto, 20px);"> + <div data-expected-height="40" style="padding: 5px 0px;"></div> + <div data-expected-height="40"></div> +</div> + +<pre>grid-template-columns: minmax(auto, 0px) minmax(auto, 0px); item border height: 10px;</pre> + +<div class="grid verticalRL" style="grid-template-columns: minmax(auto, 0px) minmax(auto, 0px);"> + <div data-expected-height="10" style="border: solid 5px blue;"></div> + <div data-expected-height="10"></div> +</div> + +<pre>grid-template-columns: minmax(auto, 20px) minmax(auto, 20px); item border height: 10px;</pre> + +<div class="grid verticalRL" style="grid-template-columns: minmax(auto, 20px) minmax(auto, 20px);"> + <div data-expected-height="40" style="border: solid 5px blue;"></div> + <div data-expected-height="40"></div> +</div> + +<pre>grid-template-columns: minmax(auto, 0px) minmax(auto, 0px); item height + margin + border + padding: 10px;</pre> + +<div class="grid verticalRL" style="grid-template-columns: minmax(auto, 0px) minmax(auto, 0px);"> + <div data-expected-height="8" style="height: 4px; margin: 1px; padding: 1px; border: solid 1px blue;"></div> + <div data-expected-height="10"></div> +</div> + +<pre>grid-template-columns: minmax(auto, 20px) minmax(auto, 20px); item height + margin + border + padding: 10px;</pre> + +<div class="grid verticalRL" style="grid-template-columns: minmax(auto, 20px) minmax(auto, 20px);"> + <div data-expected-height="8" style="height: 4px; margin: 1px; padding: 1px; border: solid 1px blue;"></div> + <div data-expected-height="40"></div> +</div> |