W3C home > Mailing lists > Public > www-style@w3.org > October 2008

RE: [Css Variables] Variable Declaration Blocks

From: Chris Miller <chris@blinkbox.com>
Date: Mon, 6 Oct 2008 12:06:50 +0100
Message-ID: <9D8B012531C07B45913FFB083D82BF532229DE@rpc.blinkbox.com>
To: <www-style@w3.org>

I've only been on this mailing list for a couple of months now so please forgive me if I've overlooked some important discussions surrounding this subject. Feel free to point me in the direction of any relevant information that I may have missed.

In answer to your questions from my perspective:

1)

>> Basic organisation & structure.
"The ability to define consistent attributes in a single location"

This allows developers to organise basic information (e.g. colours & lengths) in a single location in order to improve structure & ease maintenance. 
The only ways to achieve this currently are by using basic search and replace, a CSS pre-processor or multiple classes in the HTML.


>> True Inheritance / partial styles.
"The ability to apply a (partial) set of CSS attributes to multiple style definitions"

A natural extension of the first point is to be able to set multiple attributes at the same time (although this would make any implementation far more complex). A couple of examples would be border/background/padding and font/color/text-decoration combos. Another example would be to apply the easyclearing technique to specific containers from within the CSS.
Currently the only ways to achieve this are a CSS pre-processor or multiple classes in the HTML.

2) 

In all of the above examples, it would make sense to allow this to be modified on the client using the CSSOM. By doing this, you would give the proposal a clear advantage over the other approaches.

Also, using multiple classes in the HTML would seem to go against the idea of separating content from style (IMHO).

3) Gets my vote...

Kindest Regards
Chris

Refs:
http://disruptive-innovations.com/zoo/cssvariables/
http://www.positioniseverything.net/easyclearing.html




 
BlinkBox Entertainment Ltd - don't just watch
Chris Miller | Development Engineer | +44 20 7092 8700
 
-----Original Message-----
From: www-style-request@w3.org [mailto:www-style-request@w3.org] On Behalf Of Andrew Fedoniouk
Sent: 01 October 2008 17:46
To: www-style
Subject: Re: [Css Variables] Variable Declaration Blocks


Why would people need "CSS variables" at all?

We've got a lot of discussion around them but I am failing to
see the forest behind those trees.

Could anyone clearly explain why "CSS variables" there at all:
1) What problems they are trying to solve, etc.?
2) Why they are variables and not constants?
3) Are there any requests from community for exactly variables?

Thanks in advance.

-- 
Andrew Fedoniouk.

http://terrainformatica.com
Received on Monday, 6 October 2008 11:23:28 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:55:15 GMT