Skip to content

Commit 248ad8d

Browse files
[css-align] justfy-items accepts 'legacy' and drops support for 'auto'
The syntax of the 'justify-items' property accepts a new 'legacy' value, replacing the 'auto' value which is now parsed as invalid. w3c/csswg-drafts#1318 This change affects also to the 'place-items' shorthand, which doesn't accept 'auto' and, for the time being, neither 'legacy'. Link to the intent-to-ship-and-remove request: https://groups.google.com/a/chromium.org/d/msgid/blink-dev/552753c1-9b2f-bb01-4fed-2ae621f2398e%40igalia.com?utm_medium=email&utm_source=footer Bug: 726147, 726148 Change-Id: I219de66b813d350fe33f00a1d4369bed8e9a2350 Reviewed-on: https://chromium-review.googlesource.com/903162 Commit-Queue: Javier Fernandez <jfernandez@igalia.com> Reviewed-by: Christian Biesinger <cbiesinger@chromium.org> Reviewed-by: Darren Shen <shend@chromium.org> Cr-Commit-Position: refs/heads/master@{#535593}
1 parent 13b72a6 commit 248ad8d

File tree

3 files changed

+25
-8
lines changed

3 files changed

+25
-8
lines changed

css/css-align/content-distribution/place-content-shorthand-004.html

+6
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,12 @@
4747
checkInvalidValues("start auto")
4848
}, "Verify 'auto' values are invalid");
4949

50+
test(function() {
51+
checkInvalidValues("self-start")
52+
checkInvalidValues("center self-end")
53+
checkInvalidValues("self-end start")
54+
}, "Verify self-position values are invalid");
55+
5056
test(function() {
5157
checkInvalidValues("")
5258
}, "Verify empty declaration is invalid");

css/css-align/default-alignment/parse-justify-items-002.html

+7-7
Original file line numberDiff line numberDiff line change
@@ -19,39 +19,39 @@
1919
test(function() {
2020
element = document.createElement("div");
2121
document.body.appendChild(element);
22-
checkValues(element, "justifyItems", "justify-items", "", "legacy");
22+
checkValues(element, "justifyItems", "justify-items", "", "normal");
2323
}, "Test 'initial' value when nothing is specified");
2424

2525
test(function() {
2626
container.style.display = "";
27-
checkInitialValues(element, "justifyItems", "justify-items", "center", "legacy");
27+
checkInitialValues(element, "justifyItems", "justify-items", "center", "normal");
2828
}, "Test justify-items: 'initial'");
2929

3030
test(function() {
3131
container.style.display = "grid";
32-
checkInitialValues(element, "justifyItems", "justify-items", "safe start", "legacy");
32+
checkInitialValues(element, "justifyItems", "justify-items", "safe start", "normal");
3333
}, "Test grid items justify-items: 'initial'");
3434

3535
test(function() {
3636
container.style.display = "flex";
37-
checkInitialValues(element, "justifyItems", "justify-items", "unsafe end", "legacy");
37+
checkInitialValues(element, "justifyItems", "justify-items", "unsafe end", "normal");
3838
}, "Test flex items justify-items: 'initial'");
3939

4040
test(function() {
4141
container.style.display = "";
4242
element.style.position = "absolute";
43-
checkInitialValues(element, "justifyItems", "justify-items", "start", "legacy");
43+
checkInitialValues(element, "justifyItems", "justify-items", "start", "normal");
4444
}, "Test absolute positioned elements justify-items: 'initial'");
4545

4646
test(function() {
4747
container.style.display = "grid";
4848
element.style.position = "absolute";
49-
checkInitialValues(element, "justifyItems", "justify-items", "end", "legacy");
49+
checkInitialValues(element, "justifyItems", "justify-items", "end", "normal");
5050
}, "Test absolute positioned grid items justify-items: 'initial'");
5151

5252
test(function() {
5353
container.style.display = "flex";
5454
element.style.position = "absolute";
55-
checkInitialValues(element, "justifyItems", "justify-items", "end", "legacy");
55+
checkInitialValues(element, "justifyItems", "justify-items", "end", "normal");
5656
}, "Test absolute positioned flex items justify-items: 'initial'");
5757
</script>

css/css-align/default-alignment/place-items-shorthand-004.html

+12-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,18 @@
3737
checkInvalidValues("auto")
3838
checkInvalidValues("auto right")
3939
checkInvalidValues("auto auto")
40-
}, "Verify 'auto' value is invalid as first longhand value.");
40+
checkInvalidValues("center auto")
41+
}, "Verify 'auto' value is invalid.");
42+
43+
test(function() {
44+
checkInvalidValues("legacy")
45+
checkInvalidValues("legacy start")
46+
checkInvalidValues("end legacy")
47+
checkInvalidValues("legacy left")
48+
checkInvalidValues("center legacy")
49+
checkInvalidValues("start legacy center")
50+
}, "Verify 'legacy' value is invalid.");
51+
4152

4253
test(function() {
4354
checkInvalidValues("")

0 commit comments

Comments
 (0)