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-items-percentage-paddings-010.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-items-percentage-paddings-010.html')
-rw-r--r-- | testing/web-platform/tests/css/css-grid/grid-items/grid-items-percentage-paddings-010.html | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-grid/grid-items/grid-items-percentage-paddings-010.html b/testing/web-platform/tests/css/css-grid/grid-items/grid-items-percentage-paddings-010.html new file mode 100644 index 0000000000..18c8a9b7c8 --- /dev/null +++ b/testing/web-platform/tests/css/css-grid/grid-items/grid-items-percentage-paddings-010.html @@ -0,0 +1,42 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS Grid Layout Test: Grid items with percentage paddings</title> +<link rel="author" title="Javier Fernandez Garcia-Boente" href="mailto:jfernandez@igalia.com"> +<link rel="help" href="https://drafts.csswg.org/css-grid-1/#item-margins"> +<meta name="assert" content="Checks grid items percentage paddings are resolved correctly in a 'auto' sized grid area after changing the item's width and forcing a new layout."> +<link rel="match" href="../../reference/ref-filled-green-100px-square.xht"> +<link rel="stylesheet" href="/css/support/grid.css"> +<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> +<style> +.container { + width: 100px; +} +.child { + min-width: 80px; + min-height: 100px; + padding: 0px 10px; + background: red; +} +.ref { + position: absolute; + z-index: -1; + height: 100px; +} +.grid { + background: none; + grid-template-rows: 100px; +} +#item { + padding: 0px 10%; + background: green; +} +</style> +<p>Test passes if there is a filled green square and <strong>no red</strong>.</p> +<div class="container ref"><div class="child"></div></div> +<div class="container grid"><div class="child" id="item"></div></div> +<script> + item.offsetLeft; + item.style.padding = "0px 50%"; + item.offsetLeft; + item.style.padding = "0px 10%"; +</script> |