Re: [css-variables] -- considered harmful

On Wed, Nov 4, 2015 at 3:14 PM, Cameron McCormack <cam@mcc.id.au> wrote:
> On 2 Nov 2015, at 8:57 pm, Daniel Glazman <daniel.glazman@disruptive-innovations.com> wrote:
>>
>> Hi there,
>>
>> I just stumbled upon a set of slides authored by Wilson Page from
>> Mozilla about WebComponents in Gaia. And in this set, I found the
>> following slide (please note these great slides are just a live
>> example of CSS Variables usage and I link to a screenshot of them here
>> only as such):
>>
>>  http://pbs.twimg.com/media/CSyy2UGWcAA2lbh.png
>>
>> Reading this slide triggered many, many comments here.
>> So I'd like this mailing-list to record my POV on the -- syntax:
>>
>> 1. I still find it our ugliest syntactic decision in 20 years
>
> I like the -- prefix.  But var(--foo) is ugly.  If we need to separate the names of real properties with custom properties, I think --foo is fine.  Visually it works better for me than var-.

I do not quite agree with you for this.

I think we can probably reuse the -- prefix in future specs which
needs <custom-ident>. In CSS Animations and CSS Counter Styles, we
have met issues for supporting <custom-ident>s which are
indistinguishable with normal keywords. It causes ambiguity, breaks
forward compatibility, and adds complexity of implementation. IMO, the
"--" prefix would be a good candidate for solving this in the future..

- Xidorn

Received on Wednesday, 4 November 2015 04:42:12 UTC