W3C home > Mailing lists > Public > www-style@w3.org > February 2011

Re: CSS Variables

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Mon, 7 Feb 2011 11:19:29 -0800
Message-ID: <AANLkTimP93AN=h9sggw2uvpUqTc+f57uLQmEMTXMni=3@mail.gmail.com>
To: "Jens O. Meiert" <jens@meiert.com>
Cc: www-style@w3.org
On Mon, Feb 7, 2011 at 10:09 AM, Jens O. Meiert <jens@meiert.com> wrote:
>> > A few weeks ago I gave a talk about some experimental things some
>> > of our teams at Chrome are working on.  (You can see the subsequent
>> > blogpost at <http://www.xanthir.com/blog/b49w0>.)  I obviously want
>> > to bring all of them to the group soon, but I want to start on Variables,
>> >
>> > So, thoughts?
>
> I believe Bert summarized the situation pretty well in
> <http://www.w3.org/People/Bos/CSS-variables>.

I think Alex Russell responded to that article pretty well in
<http://infrequently.org/2008/08/css-variables-are-the-future/>.


> TL;DR comments but
>
>> > This sucks for authors, particularly as the rise of preprocessing
>> > frameworks
>>
>> The fact that this can be done by pre-processors is actually a
>> counter-argument to including it in CSS.
>
> I agree.
>
> In addition, some challenges authors try to find an answer for in
> variables/constants can be addressed by simple things like
> declaration-based sorting already:
> <http://meiert.com/en/blog/20090401/why-css-needs-no-variables/>.

Some things, but not all.  Further, that kind of sorting can make the
application as a whole harder to read, as you have seemingly-unrelated
selectors grouped together just because they happen to use the same
property/value.

I think the kind of organization that variables lets you exploit is
very clear and useful, and preprocessors have shown that this
organization makes it easy to put together large applications while
still being easily readable.

~TJ
Received on Monday, 7 February 2011 19:20:21 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:37 GMT