Re: Selector Sugar

Simetrical wrote:
> [skipped] As a practical
> example, consider something like
>
> div span:match(span + span)
>
> which matches a span that has a div ancestor *and* is immediately
> preceded by a span.  I'm pretty sure there's no possible way to do
> this with current CSS selectors, so it's not just semantic sugar.
>
> [skiped]
>   
"there's no possible way to do this" is not correct. Try the following:

<html>
<head>
  <style>
    div span + span { color:red; }
  </style> 
<head>
<body>
  <div><span>111</span><span>222</span></div>
  <span>333</span><span>444</span>
</body>
</html>

-- 
Andrew Fedoniouk.

http://terrainformatica.com

Received on Friday, 10 October 2008 18:57:46 UTC