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

On Tue, Mar 18, 2014 at 11:27 AM, Marat Tanalin <mtanalin@yandex.ru> wrote:

> FWIW, I would like to repeat my recent idea of using `$` as a prefix for
> declaring a variable and `$()` function to get a variable value.
>
>     p {
>         $company-color-1: green;
>         background-color: $(company-color-1);
>     }
>
> Important part here is that retrieving a variable value is proposed to be
> done via _functional_ notation `$()` instead of using just prefix for both
> declaring and retrieving as before.
>
> As far as I understand, the main reason of why Tab's original idea of
> using `$` has eventually been dropped was some uncertainty about its
> possible extensibility for being used in property _names_ besides property
> _values_. Using _functional_ notation to retrieve a variable value proposed
> by me currently rules this issue out completely.
>
> (Since there was no any feedback, the idea has probably just been missed
> by those responsible since it was a final part of a longer message:
>
> http://lists.w3.org/Archives/Public/www-style/2014Mar/0335.html )
>
>

Note that really the primary driver for changing anything would be a single
way to notate 'custom things', if we add $ into selectors I believe we lose
one of the few remaining characters and, again - from my other thread and
make it more cryptic - it's yet another kind of magic looking looking.  Why
invent wholly new looking solutions when there are at least 2 very good
ones on the table.

_jquery_something
--jquery-something

The former requires (I think) no changes to existing parsers, stands out,
looks familliar is easy to explain, etc.  The later requires a minor change
to the parser, stands out, looks familliar, is easy to explain, etc.  I
honestly think it is time (like today) to put a box on this discussion
around a simple "yes it's worth changing to one of those two options" and
"which one".  If keep on any other path much longer the train will roar
past us while we're busy debating the schedule.




-- 
Brian Kardell :: @briankardell :: hitchjs.com

Received on Tuesday, 18 March 2014 15:42:04 UTC