Re: [csswg-drafts] [css-syntax] Trim whitespace around declarations? (#774)

Yes, both the guaranteed-invalid change and the change AmeliaBR proposes help.

I suggest adding after the first paragraph in the guaranteed-invalid section a clarification that (despite its name) this guaranteed-invalid value is nevertheless not an "illegal value": i.e. "--foo: initial" (or unset, or inherit) is not an invalid declaration to be discarded.  The sentence currently at the end of the second paragraph is relevant to how this change is made (i.e. maybe some things should be reordered; and of course the rest of the second paragraph might need changing depending on the resolution of the serialization problem).

Regarding serialization: a problem similar to the one that Tab mentions for getProperty is that setProperty("--foo", "", ...) is currently defined as being equivalent to removeProperty("--foo").  However, changing the second argument to a space might be enough to avoid that.  If so, then I wonder whether getProperty on a custom property should similarly return a space if the value is an empty sequence of tokens, so as to reduce bugs where a subsequent setProperty fails to restore the value current at the time of getProperty.

-- 
GitHub Notification of comment by prjnt
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/774#issuecomment-515329876 using your GitHub account

Received on Friday, 26 July 2019 06:40:45 UTC