W3C home > Mailing lists > Public > www-style@w3.org > June 2013

Re: [selectors4] Multiple subject indicators

From: Brice PARENT <briceparent@free.fr>
Date: Wed, 19 Jun 2013 08:50:46 +0200
Message-ID: <51C154C6.10004@free.fr>
To: www-style@w3.org
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) :

"(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"

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

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:14:29 UTC