W3C home > Mailing lists > Public > www-style@w3.org > July 2008

Changing the attribute subcode selector [att|=val]

From: Ash Searle <ash@hexmen.com>
Date: Tue, 01 Jul 2008 09:39:38 +0100
To: www-style@w3.org
Message-ID: <op.udluccy7rvsayf@metal.config>

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
Received on Wednesday, 2 July 2008 15:27:52 GMT

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