W3C home > Mailing lists > Public > www-style@w3.org > February 2004

Re: [CSS21] response to issue 82

From: Bert Bos <bert@w3.org>
Date: Mon, 23 Feb 2004 02:15:32 +0100
Message-ID: <16441.21556.785542.826595@lanalana.inria.fr>
To: www-style@w3.org

fantasai writes:

> EXAMPLE { border: solid }
> EXAMPLE[notation=octal] { background: silver }
> 
> Note that, contrary to the sentence I quoted, <example notation=octal>
> will have a solid border.

The example is a simplification. It hints at a solution, it doesn't
give an algorithm that works in all cases. It assumes, indeed, that
the two original rule sets contain declarations for the same
properties, but with different values. Or that the rule for the other
attribute is modified as the new rule is added.

But it assumes more: that there is no other, equally specific rule
that sets the same properties. Because if there is, then the simple
element selector may not get used at all.

To make a truly equivalent rule, with the right specificity and that
matches only elements without an attribute, you would need the :not()
from CSS3, but we can't use that here.

I don't think we need to explain all the assumptions. The example is a
hint, people can fill in the details themselves. But as I said, if
there is something we can do to explain the somewhat vague word
"might" in the example, without introducing more confusion than it
solves, we can do so later. I'd rather point to CSS3, though, that has
the same example, but shorter and better.



Bert
-- 
  Bert Bos                                ( W 3 C ) http://www.w3.org/
  http://www.w3.org/people/bos/                              W3C/ERCIM
  bert@w3.org                             2004 Rt des Lucioles / BP 93
  +33 (0)4 92 38 76 92            06902 Sophia Antipolis Cedex, France
Received on Sunday, 22 February 2004 20:15:47 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:26 GMT