-
Notifications
You must be signed in to change notification settings - Fork 757
Open
Labels
cssom-1Current WorkCurrent Work
Description
https://drafts.csswg.org/cssom/#serialize-a-css-value
If component values can be omitted or replaced with a shorter representation without changing the meaning of the value, omit/replace them.
But there are 2 different minimal ways to represent list-style: outside none disc:
list-style: outsidelist-style: disc
And there are 3 different minimal ways to represent border: medium none currentcolor:
border: mediumborder: noneborder: currentcolor
And there are 4 different minimal ways to represent text-decoration: none solid currentcolor auto:
text-decoration: nonetext-decoration: solidtext-decoration: currentcolortext-decoration: auto
And so on with lots of shorthands. Which minimal serialization should be picked?
var {style} = document.createElement("div");
style.listStyle = "outside none disc";
style.listStyle; // Firefox: "outside". Blink/WebKit: "outside none disc"
style.border = "medium none currentcolor";
style.border; // Firefox: "medium none". Blink/WebKit: "medium none currentcolor"
style.textDecoration = "none solid currentcolor auto";
style.textDecoration; // Firefox: "none". Blink: "none solid currentcolor". WebKit: "" (CSS3 syntax not implemented)Metadata
Metadata
Assignees
Labels
cssom-1Current WorkCurrent Work