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

Re: [css4-selectors]

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Tue, 29 Nov 2011 11:43:59 -0800
Message-ID: <CAAWBYDBm21NYtpTsV8cyYeVcgCFeo7NkjjX6k7+HZM81vYNyqQ@mail.gmail.com>
To: Florian Rivoal <florianr@opera.com>
Cc: www-style@w3.org
On Tue, Nov 29, 2011 at 2:42 AM, Florian Rivoal <florianr@opera.com> wrote:
> 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.

Shorter Oyvind:  Selectors work on the element-tree.  'content'
changes the box tree.

~TJ
Received on Tuesday, 29 November 2011 19:44:55 GMT

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