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

On Thu, Mar 13, 2014 at 8:20 PM, Zack Weinberg <zackw@panix.com> wrote:
> I have to say that as a matter of abstract design, "--" does seem marginally
> better than an underscore, and as an implementer, I would not miss the
> special case logic needed to accept -foo and -f-oo but not --foo as IDENTs
> (for Gecko, see
> http://mxr.mozilla.org/mozilla-central/source/layout/style/nsCSSScanner.cpp#165
> and its uses). But if changing Syntax is on the table, I would also worry
> about whether value or selector syntax might (now or in the future) in some
> contexts depend on --foo being understood as - -foo. I don't have those
> memorized the way I do the core lexer.

No, we don't currently have that in any context, nor are there any
current plans for such.  It would be *extremely* weird, since we don't
use -foo in the core language at all, and so any case where a "-" can
be put next to an ident-like token *already* requires a space between
them, to avoid the "-" being interpreted as part of the ident.

I'm potentially open to tweaking Syntax here (the fact that it's in CR
is just a Process sop; we can continue to change as
prudent/necessary), but as Simon says, this is a larger change than
just switching the naming pattern from one valid ident to another.
I'll leave it to heycam to decide whether this is something that's
possible to do within their shipping deadline or not.

~TJ

Received on Saturday, 15 March 2014 16:29:38 UTC