diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
commit | 36d22d82aa202bb199967e9512281e9a53db42c9 (patch) | |
tree | 105e8c98ddea1c1e4784a60a5a6410fa416be2de /testing/web-platform/tests/css/css-grid/alignment/grid-content-alignment-with-abspos-001.html | |
parent | Initial commit. (diff) | |
download | firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.tar.xz firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.zip |
Adding upstream version 115.7.0esr.upstream/115.7.0esr
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/css/css-grid/alignment/grid-content-alignment-with-abspos-001.html')
-rw-r--r-- | testing/web-platform/tests/css/css-grid/alignment/grid-content-alignment-with-abspos-001.html | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-grid/alignment/grid-content-alignment-with-abspos-001.html b/testing/web-platform/tests/css/css-grid/alignment/grid-content-alignment-with-abspos-001.html new file mode 100644 index 0000000000..c9aa165e80 --- /dev/null +++ b/testing/web-platform/tests/css/css-grid/alignment/grid-content-alignment-with-abspos-001.html @@ -0,0 +1,54 @@ +<!DOCTYPE html> +<html> +<head> +<title>CSS Grid Layout Test: dynamic content alignment with abspos elements.</title> +<link rel="author" title="Kurt Catti-Schmidt" href="mailto:kschmi@microsoft.com"> +<link rel="help" href="https://drafts.csswg.org/css-grid/#alignment"> +<link rel="help" href="https://drafts.csswg.org/css-align-3/#content-distribution"> +<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-align-content"> +<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-justify-content"> +<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1248940"> +<link rel="stylesheet" href="/css/support/grid.css"> +<link rel="stylesheet" href="/css/support/alignment.css"> +<meta name="assert" content="Test that dynamically changing alignment for abspos grid items works as expected." /> + +<style> +body { + margin: 0px; + width: 800px; +} + +.grid { + width: 100%; + height: 600px; +} + +.a { + width: 140px; + height: 60px; + border: 1px solid purple; + position: absolute; +} +</style> + +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> +<script> + function updateAlignmentAndCheckLayout() { + let item = document.getElementById("item"); + item.style.alignSelf = "center"; + item.style.justifySelf = "center"; + checkLayout('.grid'); + } +</script> +</head> + +<body onload="updateAlignmentAndCheckLayout()"> + + <div class="grid" data-expected-width="800" data-expected-height="600"> + <div class="a" id="item" data-offset-x="329" data-offset-y="269" data-expected-width="142" data-expected-height="62"></div> + </div> + +</body> +</html> |