Re: [css-variables] ...let's change the syntax

On Sun, Mar 16, 2014 at 7:00 AM, François REMY
<francois.remy.dev@outlook.com> wrote:
>> I also think it should
>> be required as a prefix, not just a substring anywhere.  That has the
>> advantage of being easier to check in the parser, as well as enforcing
>> some uniformity.
>
> Please no :-(
>
> It's a 95 seconds win for the person authoring the parser, but it's a loss
> for the others. Would you mind giving us the possibility to put "--"
> anywhere? This encourages custom-namespace-prefixing & looks better to my
> eyes (I would even say: why not keep the syntax spec intact and only allow
> "--" inside the token, but that's maybe asking too much). By the way, Alan
> Stearns mentioned on Twitter using "--" to comment out declarations, and I
> think I may have been doing the same in the past; no big deal but worth
> mentioning.

Keeping it as a prefix has advantages beyond just "it's easier to
check in the parser" - namely, it's a really obvious visual cue that
makes it easier to see the custom properties.

It also means that authors don't have to remember which word-joiners
are "-" and which are "--" in a custom property - they'll all be "-",
like normal.

~TJ

Received on Monday, 17 March 2014 20:26:16 UTC