summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-grid/alignment/grid-alignment-style-changes-006.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-grid/alignment/grid-alignment-style-changes-006.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-grid/alignment/grid-alignment-style-changes-006.html')
-rw-r--r--testing/web-platform/tests/css/css-grid/alignment/grid-alignment-style-changes-006.html67
1 files changed, 67 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-grid/alignment/grid-alignment-style-changes-006.html b/testing/web-platform/tests/css/css-grid/alignment/grid-alignment-style-changes-006.html
new file mode 100644
index 0000000000..21e7d0d3ab
--- /dev/null
+++ b/testing/web-platform/tests/css/css-grid/alignment/grid-alignment-style-changes-006.html
@@ -0,0 +1,67 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Grid Layout Test: Changing Self-Alignment properties to interfere in Baseline Alignment</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/#grid-align">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#self-alignment">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#align-self-property">
+<link rel="help" href="https://drafts.csswg.org/css-align-3/#typedef-baseline-position">
+<meta name="assert" content="Changing the 'align-self' property's value of a grid item to 'baseline' will include such item into a baseline context, which implies recomputing all the baseline offsets and aligning the items in such context.">
+<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
+<style>
+#container {
+ position: relative;
+ display: inline-grid;
+ grid: 100px / 50px 50px 50px;
+ background: grey;
+ align-items: baseline;
+ font-family: Ahem;
+ line-height: 1;
+}
+#item1 {
+ font-size: 20px;
+ background: blue;
+}
+#item2 {
+ font-size: 40px;
+ background: green;
+ align-self: center;
+}
+#item3 {
+ font-size: 30px;
+ background: red;
+}
+</style>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/resources/check-layout-th.js"></script>
+<script src="support/style-change.js"></script>
+<script>
+setup({ explicit_done: true });
+function runTest() {
+ let before = {
+ item1: {"data-offset-y": 8 },
+ item2: {"data-offset-y": 30 },
+ item3: {"data-offset-y": 0 }
+ }
+
+ let after = {
+ item1: {"data-offset-y": 16 },
+ item2: {"data-offset-y": 0 },
+ item3: {"data-offset-y": 8 }
+ }
+
+ evaluateStyleChangeMultiple("before", before);
+ item2.style.alignSelf = "baseline";
+ evaluateStyleChangeMultiple("after", after);
+ done();
+}
+</script>
+<body onload="document.fonts.ready.then(() => { runTest(); })">
+ <div id="container">
+ <div id="item1" data-expected-width="50" data-expected-height="20" data-offset-x="0">É</div>
+ <div id="item2" data-expected-width="50" data-expected-height="40" data-offset-x="50">É</div>
+ <div id="item3" data-expected-width="50" data-expected-height="30" data-offset-x="100">É</div>
+ </div>
+ <div id="log"></div>
+</body>