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

On Apr 11, 2005 1:08 PM, Ian Hickson <ian@hixie.ch> wrote:
> 
> 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).
> 

As opposed to 

input { color(white, black); }
input:invalid{ color(red,); }
input:disabled{ color(,grey); }

or

input { color(white, black); }
input:invalid{ color(red, inherit); }
input:disabled{ color(inherit,grey); }

Here it doesn't seem to change that much, but there are instances of
other types of properties that wouldn't gain more from this.

Orion Adrian

Received on Monday, 11 April 2005 17:12:27 UTC