W3C home > Mailing lists > Public > www-style@w3.org > November 2015

Re: [css-variables] -- considered harmful

From: Xidorn Quan <quanxunzhen@gmail.com>
Date: Wed, 4 Nov 2015 15:41:03 +1100
Message-ID: <CAMdq69_vPdvy0en1Uo21ZUVfddMe=bEDNQFNw1-Q3+zyFPYoAA@mail.gmail.com>
To: Cameron McCormack <cam@mcc.id.au>
Cc: Daniel Glazman <daniel.glazman@disruptive-innovations.com>, "www-style@w3.org" <www-style@w3.org>
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

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:58 UTC