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

Re: WebKit now supports CSS Variables

From: Andrew Fedoniouk <news@terrainformatica.com>
Date: Tue, 24 Jun 2008 12:34:09 -0700
Message-ID: <48614C31.1050907@terrainformatica.com>
To: David Hyatt <hyatt@apple.com>
CC: Håkon Wium Lie <howcome@opera.com>, www-style list <www-style@w3.org>

Is there any use case for CSS variables to be mutable (not constants)?

As far as I can see the only difference from CSS constants ( 
http://csswg.inkedblade.net/ideas/constants )
is the ability to change values in runtime (from script).  So is the 
question above.

There is clearly a need for such thing as CSS vars/consts, but 
particular model (vars vs. consts) is still debatable.
At least for me. CSS consts as parse time entities allow to define 
shortcut attributes too, btw.

On other side if we already on the way of moving CSS declarations from 
static form to something that is getting
evaluated at runtime (early birds: MQ, calc()) then CSS-vars fit the 
model. As a logical corollary I think it will be some
sort of dynamic (behavioral?) extensions of  CSS that will allow to 
manipulate values of variables:

   on-value-changed! : var(theme-back-color) = #ff0000,
                                  var(theme-back-image) =  

(That is CSSS! - http://terrainformatica.com/htmlayout/csss!.htm )

I mean that: if we say "A" (variables in CSS) then we should be ready to 
pronounce "B"
( some sort of dynamic [sub-]language in CSS ). Otherwise CSS-vars as 
mutable entities
appears as overkill if to compare them with @const.

Andrew Fedoniouk.
Received on Tuesday, 24 June 2008 19:35:18 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:37 UTC