Re: [selectors4] Multiple subject indicators

Le 13/06/2013 14:18, Lea Verou a écrit :
> Brilliant! IMO this is better than both the options I outlined.

So this could even be more usefull if the subject was not pointed using
just "!" as a prefix or a suffix, but with opening and closing chars.
Let me explain myself with a short example (using paenthesis) :

<a><b><c><d><e/></d></c></b></a>
"(b) (d) e" → matches elements b and d
"(b d) e" → matches elements b, c and d

Let's say we want to highlight some texts using javascript, we just put
them into a '<span class="highlight"/>'.
"(b d) span.highlight{display:inherit}" would ensure that those texts
are displayed, even if their ancestors between b and d were
"display:none" before.

I'm using parenthesis because it's what people is the most used to for
capturing substrings, mainly because of the regular expressions format,
but anything could be used, even "!" like "!b d! e"

Brice PARENT

Received on Thursday, 20 June 2013 08:56:09 UTC