W3C home > Mailing lists > Public > www-style@w3.org > November 2011


From: Florian Rivoal <florianr@opera.com>
Date: Tue, 29 Nov 2011 11:42:50 +0100
To: www-style@w3.org
Message-ID: <op.v5pepou14p7avi@localhost.localdomain>
In the minutes Fantasai wrote:
> The ability to select ancestors of elements is a particular area
> of concern since it is difficult to optimize for CSS selection.

I have another concert with this than optimization. Given the
following markup and style, what do you expect to happen:


div! div {content: "Bar";}

The selector should match the outer div, the replace its content
with "Bar", after which it shouldn't match anymore, so we get
<div>Foo</div> back, at which point it matches again...

We could solve that by saying "You can't do that", and deciding
that the rule should be discarded, but I wonder how easy it will
be do define exactly what it is you can't do, and how costly it
would be to detect at runtime (maybe not too much, just haven't
fully thought it through).

Otherwise, at best, we have an infinite loop. At worse, we're
one step closer to accidentally being turing complete.

  - Florian
Received on Tuesday, 29 November 2011 10:43:23 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:07 UTC