W3C home > Mailing lists > Public > www-style@w3.org > August 2001

Re: Regular Expressions as CSS Selectors?

From: Claus Färber <list-w3c-style@faerber.muc.de>
Date: 18 Aug 2001 12:04:00 +0200
To: www-style@w3.org
Message-ID: <8743DxkJcDB@3247.org>
Bjoern Hoehrmann <derhoermi@gmx.net> schrieb/wrote:
> * Claus Färber wrote:
>> what about adding regular expressions to the CSS selector syntax?

> I'm in doubt there is any good reason to select parts of a text node
> besides ::first-(line|letter|word). If there is something special about
> a certain part of it, you should mark up it with appropriate markup.

Well, it certainly is Yet Another Language Element That Can Be  
Abused. However, in some cases there might be no special meaning  
associated with the part of the text at all or the meaning might  
be fully reflected with existing markup.

For example, I might want to write the site owner's name in a  
different colour. As there's no adequate element in HTML, I'd have  
to use something like span.myname - not really something that  
carries meaning.

Another application might be to write every letter (or other parts  
of a word) in different colours; without regexps you'd have to use  
<span class="my">my</span><span class="name">Name</span>.

Then of course, regexps for attribute selectors have a completly  
different are of applications.

Claus
-- 
begin  Your-so-called-newsreader-is-seriously-broken
unless you can read this.
end
                                                    http://www.faerber.muc.de
Received on Saturday, 18 August 2001 07:28:31 GMT

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