W3C home > Mailing lists > Public > www-style@w3.org > February 2015

Re: [selectors] Previous-sibling combinator?

From: Liam R E Quin <liam@w3.org>
Date: Wed, 11 Feb 2015 20:40:20 -0500
To: Benjamin Poulain <benjamin@webkit.org>
Cc: "Tab Atkins Jr." <jackalmage@gmail.com>, Marat Tanalin <mtanalin@yandex.ru>, Clive Chan <doobahead@gmail.com>, Brad Kemper <brad.kemper@gmail.com>, Henrik Andersson <henke@henke37.cjb.net>, www-style list <www-style@w3.org>
Message-ID: <20150211204020.4a1cdc56.liam@w3.org>
On Wed, 11 Feb 2015 14:54:07 -0800Benjamin Poulain <benjamin@webkit.org> wrote:

> On 2/11/15 2:43 PM, Liam R E Quin wrote:
> > On Thu, 12 Feb 2015 08:24:03 +1100

> > To some extent it's better to give people enough rope to tie themselves up and have fun^H^H^Hproblems, better to have completeness, than to have something incomplete where people spend ages publishing weird workarounds that end up even more tangled.

[...]

> The problem is doing efficient style invalidation. You don't want a 
> single selector to invalidate giant subtrees every time any of its 
> element changes.

It'll still be more efficient to have the browser do it than to do it in jQuery I expect, and opens up more Web functionality to more people. But it's a difference of philosophy, whether you go for completeness or for a subset of functionality.

I'm not sure how previous-sibling opens up the worst-case scenario you hint at, nor how common that would be. "parent" is another matter.

Best,

Liam


-- 
Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/
Pictures from old books: http://fromoldbooks.org/

The barefoot typographer
Received on Thursday, 12 February 2015 01:40:28 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:52:01 UTC