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

Re: Proposal of [attr/=regex] selector

From: Philippe Wittenbergh <jk7r-obt@asahi-net.or.jp>
Date: Wed, 24 Oct 2007 14:45:30 +0900
Message-Id: <54D267E3-BDB7-4982-ADE2-1C726A7C86A6@asahi-net.or.jp>
To: www-style <www-style@w3.org>


On Oct 23, 2007, at 11:03 PM, Nikodem wrote:

>  use case of [attr^=beginning]?
> You can, for example, replace that:
>
> 	a.article
> 	{
> 		color:blue
> 	}
>
> 	<a href="http://jsmith/article/1234" class="article">One</a>
> 	<a href="http://example/article/4321" class="article">Two</a>
>
> with that:
>
>
> 	a[href/=/article/]
> 	{
> 		color:blue
> 	}

a[href*='/article/'] {color:white; background:lime;}

Have a look at:
http://www.w3.org/TR/css3-selectors/#attribute-selectors

Philippe.
Received on Wednesday, 24 October 2007 05:45:47 GMT

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