W3C home > Mailing lists > Public > public-css-archive@w3.org > July 2019

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

From: prjnt via GitHub <sysbot+gh@w3.org>
Date: Thu, 25 Jul 2019 10:54:07 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-514997895-1564052046-sysbot+gh@w3.org>
Note that the change to the custom var grammar means that ``--foo: ;`` results in --foo having its initial value, thus making ``background-image: var(--foo) #gradient`` equivalent to ``background-image: var(--no-such-var) #gradient`` per <a href="https://drafts.csswg.org/css-variables-1/#substitute-a-var">“substitute a var()” rules</a>.

So allowing substituting an empty sequence of tokens requires change to those rules [or perhaps change to the initial value].

Another consideration is that ``--foo: ;`` still violates the core grammar, which entails extra work in both spec and implementations.

However, do we absolutely need to allow custom vars to have an empty value? 'background-image' should be doable using a none layer, and 'transform' can of course be done with an identity transform. It's certainly believable that uses exist; I'm just saying that reverting adding the ‘?’ to custom var grammar is an easy option for now, and might be taken if no-one can for now think of a convincing use.

GitHub Notification of comment by prjnt
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/774#issuecomment-514997895 using your GitHub account
Received on Thursday, 25 July 2019 10:54:09 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:50 UTC