Re: WebKit now supports CSS Variables

On Jun 30, 2008, at 8:29 AM, Christoph Päper wrote:

>
> Dave Singer:
>> I was just reacting the odd-ness of declaring a constant twice (or  
>> more) with different values.
>
> I haven't followed this thread carefully, but I thought everybody  
> understood that constants are impossible in the cascade model of  
> CSS. Author-set constants that is, because we do have constants  
> already, they are called keywords. We could make keywords variable,  
> but that's it (and somehow nobody seems interested to pursuit that  
> idea).

In practice, a constant would be similar to a keyword, but one that  
you create yourself. Which is why it would make sense to set it  
somewhere near the top, and not have it change. If people do not have  
a problem with "orange" being constant, then what is the problem with  
"myCompanyColor" being constant, once it is defined? The point is not  
to prevent people from finding some JavaScript loophole method around  
its constancy, it is to allow you to have the keyword-like values that  
you create yourself.

Constants are not impossible in the cascade model of CSS, any more  
than keywords are.


>
>
>> In general in programming languages,
>
> Programming is *very* different from CSS (despite all those curly  
> brackets).
>

Received on Monday, 30 June 2008 16:19:14 UTC