Re: Targeting CSS3 only (evil?), either with pseudoclass or an extra syntax for properties.

On Mon, 11 Apr 2005, Orion Adrian wrote:
> > > 
> > > The structures we're working on do not behave this way. They are not 
> > > single property structures, but rather multi-property structures. 
> > > For example color/background color should always be set together, 
> > > but inherit seperatly and are set seperately.
> > 
> > There are cases where you only want to set one. That's part of the 
> > problem.
> 
> Can you tell me when you would only want to set one. I can imagine 
> wanting to set one two a new color and another to inherit. But there's a 
> subtle difference there. It seems to me that you always want to set 
> both, but sometimes you want to only override one. I can't imagine 
> setting border-width by itself initially - it just doesn't make sense. 
> It however is useful to replace only a single value.

Something like this is use on W3C specs:

   body { background: no-repeat fixed top left white; color: black; }
   body.wd { background-image: url(draft.png); }
   body.cr { background-image: url(candidate.png); }
   body.rec { background-image: url(recommendation.png); }

The most common cases are these cases where you want to set most of the 
style in one place, but the rest of the style elsewhere, keyed off 
different rules in the cascade.

Another example:

   input { background: white; color: black; }
   input:invalid { color: red; }
   input:disabled { background: silver; }

You don't want to have to expand that to multiple rules, it would just 
become awkard (especially as the number of variants grew).

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Monday, 11 April 2005 17:08:10 UTC