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

[css4-selectors]

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>Foo</div></div>

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 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:46 GMT