[csswg-drafts] [css-cascade] About omitted subproperty value in shorthand

upsuper has just created a new issue for 
https://github.com/w3c/csswg-drafts:

== [css-cascade] About omitted subproperty value in shorthand ==
There is an implementation difference on what should happen for 
omitted subproperty value in shorthand.

Currently, Gecko and Edge reset missing subproperties in shorthand to 
their initial value as a declared value, while Blink and WebKit sets 
them to the `initial` keyword.

The spec says:
> When values are omitted from a shorthand form, unless otherwise 
defined, each “missing” sub-property is assigned its initial value.

so it seems to me Gecko and Edge match what the spec says. But I can 
see that the text here can be easily misunderstood given the existence
 of `initial` keyword.

Can we add a note to the spec to emphasize that it is not resetting 
missing subproperties to the `initial` keyword? This may be worth 
adding a new CSSOM test into wpt.

I found this when I'm fixing Servo's code, which somehow largely 
followed the WebKit's way, and thus fails lots of tests in Gecko. It 
seems to me setting `initial` value to subproperties makes 
serialization code more complicated because individual shorthands 
would need to take CSS-wide keywords into consideration as well (and 
consequently lots of bugs in Servo serialization code in edge cases), 
so I don't want to adopt WebKit's approach here.

There is no known web-compat issue so far, but this is a detectable 
difference, so I also hope Blink and WebKit can fix this before any 
real web-compat issue appears.

Please view or discuss this issue at 
https://github.com/w3c/csswg-drafts/issues/1068 using your GitHub 
account

Received on Wednesday, 1 March 2017 00:45:00 UTC