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

Changing the attribute subcode selector [att|=val]

From: Ash Searle <ash.searle@gmail.com>
Date: Wed, 2 Jul 2008 10:05:20 +0100
Message-ID: <cb82be250807020205o202d3659w87b3cb237d13d12f@mail.gmail.com>
To: www-style@w3.org

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

But this wouldn't be:
<p>Have you seen our new <a href="#" class="new

Would it cause problems to change the definintion to have wider

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

Just a thought,



(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 GMT

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