Re: CSS Variables

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 UTC