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

> >>> An issue we're bumping into in the sass community now is namespace
> >>> collisions from 3rd-party libraries. It would be nice if CSS could 
> >>> avoid our
> >>> mistake by forcing a namespace for custom properties.
> >>
> >> That's why I'd prefer "underscore anywhere in the name" over "leading
> >> underscore" - you can put the namespace before the underscore, leading
> >> to a nice visual separation.
> >
> > Since we have -[vendor]- for custom vendor things, we could just 
> > reserve --
> > for 'no vendor, just custom'... At least it's explainable/consistent.
> It has a nice ring to it, but I don't think it's substantially better
> than _.  I can go either way.

In the light of the first paragraph of this mail, I think we should probably 
prefer "an underscore anywhere (except in the first position?)" because it 
forces to use a custom prefix, and escape any IE6-era issue altogether. Two 
dashes as a prefix is hyper rational in a certain context but is more 
contraining and already provides a "prefix" built-in; this is no worse than 
"var-" but given Chris' experience in the domain, I would lean towards a 
solution that mitigates the issue he outlines, if possible.

In addition, we tell people to avoid vendor prefixes; if we tell them 
"--angular-xyz" is good but "-webkit-transition" is bad, we are starting to 
send mixed messages, right?


Received on Thursday, 13 March 2014 21:07:18 UTC