Re: "Inheriting" from a less-specific selector

----- Original Message -----
From: Ian Hickson <py8ieh@bath.ac.uk>
To: Braden N. McDaniel <braden@endoframe.com>
Cc: <www-style@w3.org>; Bert Bos <Bert.Bos@sophia.inria.fr>
Sent: Saturday, August 28, 1999 10:48 AM
Subject: Re: "Inheriting" from a less-specific selector


> On Thu, 26 Aug 1999, Braden N. McDaniel wrote:
>
> > CSS1 has the problem that while inheritance was the effective initial
> > value for many properties, there was no way for style sheet authors to
> > specify it. So once it had been overridden, there was no way to
> > reclaim the inheritance behavior lower in the cascade. CSS2,
> > fortunately, fixed this.
> >
> > With the pseudo-classes ":active", ":hover", and ":focus", CSS2
> > introduces the notion that, by "default", these pseudo-classes inherit
> > their property values from the next-least-specific selector for an
> > element.
>
> CSS1 has this 'problem' too, and there is no need to invoke pseudo
> classes to demonstrate it: this is the whole idea of the cascade.
>
> For example:
>
>    P EM { color: red }
>    STRONG EM { color: green }
>
>    <P> <STRONG> <EM> green </EM> </STRONG> </P>
>
> How can you make an EM in a STRONG be the same color as an EM _not_ in a
> STRONG, without knowing what the colour of an EM not in a strong would
> normally be? You can't. (You could override the later rule by using
> !important, and you could change the order, but that is 'cheating'.)

Ah, right you are. I don't buy, though, that this is the "whole idea of the
cascade."

> > For the "cascade" concept to work where the state of the cascade is not
> > known in advance, it is imperitive that style sheet authors always be
> > able to restore the cascade to a defined state.
>
> Not IMHO. So long as users and UAs write stylesheets that are self-
> consistent and responsible (see David's piece, quoted earlier today),

Are you suggesting that it is reasonable for context selectors to be "off
limits" for default and user stylesheets?

> then
> there is no need for authors to be totally in control of the cascade.

But the fundamental folly of the assumption that browser designers will
ensure that they use friendly default stylesheets is soundly demonstrated by
the current crop of UA default stylesheets. Ultimately, any significant
number of user style sheets created will be through some future browser's
GUI for doing so--what reason is there to expect anything other than the
same level of robustness for the stylesheet that GUI generates?

--
Braden N. McDaniel
braden@endoframe.com
<URI:http://www.endoframe.com>

Received on Wednesday, 1 September 1999 03:39:40 UTC