Skip to content

Commit

Permalink
Exclude 'size' from the 'all' shorthand.
Browse files Browse the repository at this point in the history
Differential Revision: https://phabricator.services.mozilla.com/D162568

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1800950
gecko-commit: 76e180dbe1448c8e1bfab633acb19f8b495b4380
gecko-reviewers: emilio
  • Loading branch information
Loirooriol authored and moz-wptsync-bot committed Nov 24, 2022
1 parent e910823 commit 4435c35
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions css/cssom/cssom-getPropertyValue-common-checks.html
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,11 @@
const result = computedStyle.getPropertyValue(property);
if (CSS.supports(property, result)) {
initialValues.set(property, result);
} else if (property === "all") {
bad.push("all");
} else {
} else if (property !== "all") {
bad.push([property, result]);
}
}
assert_array_equals(bad, ["all"]);
assert_array_equals(bad, []);
}, "All properties (except 'all') can serialize their initial value (computed)");

test(function() {
Expand All @@ -87,7 +85,7 @@
style.cssText = "";
style.setProperty(property, value);
const result = style.getPropertyValue(property);
if (!CSS.supports(property, result)) {
if (!CSS.supports(property, result) && property !== "all") {
bad.push([property, value, result]);
}
}
Expand Down Expand Up @@ -121,12 +119,12 @@
style.setProperty(longhand, initialValues.get(longhand));
}
const result = style.getPropertyValue(shorthand);
if (!CSS.supports(shorthand, result)) {
if (!CSS.supports(shorthand, result) && shorthand !== "all") {
bad.push([shorthand, result]);
}
}
assert_array_equals(bad, []);
}, "All shorthands can serialize their longhands set to their initial value");
}, "All shorthands (except 'all') can serialize their longhands set to their initial value");

test(function() {
const bad = [];
Expand Down

0 comments on commit 4435c35

Please sign in to comment.