Changing the attribute subcode selector [att|=val]

The attribute selector [att|=val] is extremely restricted, aimed at
solving a single problem (language specific styling based on hyphenated
language codes.)

I'm wondering if it would be possible to either expand the definition
(preferable) or introduce a new operator to handle whitespace-separated
hyphenated codes.  An example should help:

A web-app uses the "class" attribute to its full potential, inserting a
model-number for "general processing by user agents":

<p>Have you seen our new <a href="#" class="model-B002">fandango</a>?</p>

This can easily be styled with:
[class|=model] { ... }

But, as soon as we introduce an additional class ("new"), we have an
ordering dependency where this would be styled:

<p>Have you seen our new <a href="#" class="model-B002
new">fandango</a>?</p>

But this wouldn't be:
<p>Have you seen our new <a href="#" class="new
model-B002">fandango</a>?</p>


Would it cause problems to change the definintion to have wider
applicability?

<p>Shall we discuss this at our <span class="dtstart-20080703T1400
dtend-20080703T1530">next meeting</span>???</p>


Just a thought,

Ash

References:
http://www.w3.org/TR/REC-html40/struct/global.html#adef-class
http://www.w3.org/TR/css3-selectors/#attribute-selectors

(this line added cos the mailing-server's arbitrarily & silently
ignored attempts to send this before)

Received on Wednesday, 2 July 2008 15:29:27 UTC