Re: IDs, Classes : could CSS usefully use a third (abstract) concept ?

*Laurens Holst* <lholst@students.cs.uu.nl>:
>
> I really don't see the big use in defines.
>
> h1, #nav, .date {
>     background-color: #AAF;
>     color: white;
> }

Indeed, you don't. It's when the same value applies to different  
properties for different selectors that variables could be useful, e.g.  
'color', 'background-color' and 'border-color', or (perhaps in combination  
with something like 'calc()') 'margin', 'padding', 'border-width',  
'top'/'right'/'bottom'/'left', 'width' and 'height', or 'height',  
'font-size' and 'line-height' etc.

Anyhow, it's now too late to introduce them, they would do more harm than  
good.

Received on Saturday, 12 March 2005 15:35:23 UTC