Re: Proposal of [attr/=regex] selector

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 UTC