W3C home > Mailing lists > Public > www-style@w3.org > October 2006

[css3-selectors] Multiclass selectors

From: Barry Pannebaker <barry@pannebaker.com>
Date: Sat, 30 Sep 2006 21:43:56 -0400
To: <www-style@w3.org>
Message-ID: <000001c6e4fb$10a1a0f0$0201a8c0@ThinkCentre>
In "6.3.1. Attribute presence and values selectors", in the Examples, could
the text, "Multiple attribute selectors can be used to represent several
attributes of an element, or several conditions on the same attribute." be
moved out of the example block so that it becomes normative?


The following selectors do not work, at least in IE6; both paragraphs
incorrectly take on both red and underlining.  (Test file attached.)


*.aquablock { background-color: aqua; }

*.aquablock.notice { text-decoration: underline; }

*.limeblock { background-color: lime; }

*.limeblock.notice { color: red; }


<p class="aquablock notice">This text should be underlined, but should
<em>not</em> be red.</p>


<p class="limeblock notice">This text should be red, but should <em>not</em>
be underlined.</p>


If the "Multiple attribute...." statement were made normative, perhaps it
would be implemented.


What I'm suggesting might read something like the following.  (Note, if you
just broke the Example box, and put the normative text in where it presently
falls, all of the following examples would presumably be examples of that
normative statement, and they're not.  But, perhaps you could move the
"Multiple attribute...." statement to the end, as below.)


|          DIALOGUE[character=juliet]



Multiple attribute selectors can be used to represent several attributes of
an element, or several conditions on the same attribute.



|     Example:


|     Here, the selector represents a span element whose hello attribute has
exactly the value "Cleveland" and whose goodbye attribute has exactly the
value "Columbus":

|          span[hello="Cleveland"][goodbye="Columbus"]



Really, the most helpful place to have an example of multiclass selectors
would be in section "6.4. Class selectors".  Especially helpful would be an
example that uses the universal selector, (or just implies it).  Perhaps,
after the current example in the second example block:


|     The following rule matches ANY element whose "class" attribute has
been assigned a list of whitespace-separated values that includes "insert"
and "warning":


|          .insert.warning { color: red }


|     This rule matches when class="expense insert warning blue" but does
not match for class="insert announcement".



Thank you for your consideration,


Received on Sunday, 1 October 2006 01:44:26 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:26 UTC