Navigation Menu

Skip to content

Commit

Permalink
[css-align] justfy-items accepts 'legacy' and drops support for 'auto'
Browse files Browse the repository at this point in the history
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
  • Loading branch information
javifernandez authored and chromium-wpt-export-bot committed Feb 6, 2018
1 parent bb1f351 commit cd9c97d
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 8 deletions.
Expand Up @@ -47,6 +47,12 @@
checkInvalidValues("start auto")
}, "Verify 'auto' values are invalid");

test(function() {
checkInvalidValues("self-start")
checkInvalidValues("center self-end")
checkInvalidValues("self-end start")
}, "Verify self-position values are invalid");

test(function() {
checkInvalidValues("")
}, "Verify empty declaration is invalid");
Expand Down
14 changes: 7 additions & 7 deletions css/css-align/default-alignment/parse-justify-items-002.html
Expand Up @@ -19,39 +19,39 @@
test(function() {
element = document.createElement("div");
document.body.appendChild(element);
checkValues(element, "justifyItems", "justify-items", "", "legacy");
checkValues(element, "justifyItems", "justify-items", "", "normal");
}, "Test 'initial' value when nothing is specified");

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

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

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

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

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

test(function() {
container.style.display = "flex";
element.style.position = "absolute";
checkInitialValues(element, "justifyItems", "justify-items", "end", "legacy");
checkInitialValues(element, "justifyItems", "justify-items", "end", "normal");
}, "Test absolute positioned flex items justify-items: 'initial'");
</script>
13 changes: 12 additions & 1 deletion css/css-align/default-alignment/place-items-shorthand-004.html
Expand Up @@ -37,7 +37,18 @@
checkInvalidValues("auto")
checkInvalidValues("auto right")
checkInvalidValues("auto auto")
}, "Verify 'auto' value is invalid as first longhand value.");
checkInvalidValues("center auto")
}, "Verify 'auto' value is invalid.");

test(function() {
checkInvalidValues("legacy")
checkInvalidValues("legacy start")
checkInvalidValues("end legacy")
checkInvalidValues("legacy left")
checkInvalidValues("center legacy")
checkInvalidValues("start legacy center")
}, "Verify 'legacy' value is invalid.");


test(function() {
checkInvalidValues("")
Expand Down

0 comments on commit cd9c97d

Please sign in to comment.