W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2015

Re: Shadow tree style isolation primitive

From: Brian Kardell <bkardell@gmail.com>
Date: Mon, 12 Jan 2015 17:07:37 -0500
Message-ID: <CADC=+jfOCVqmWnDsw8AWPS_mYpbbKMoUtjsA8KOAQDtC-Hy-7w@mail.gmail.com>
To: Ryosuke Niwa <rniwa@apple.com>
Cc: Chaals from Yandex <chaals@yandex-team.ru>, Anne van Kesteren <annevk@annevk.nl>, "www-style@w3.org" <www-style@w3.org>, WebApps WG <public-webapps@w3.org>
On Mon, Jan 12, 2015 at 4:57 PM, Ryosuke Niwa <rniwa@apple.com> wrote:

> > On Jan 12, 2015, at 4:13 AM, chaals@yandex-team.ru wrote:
> >
> > 09.01.2015, 16:42, "Anne van Kesteren" <annevk@annevk.nl>:
> >> I'm wondering if it's feasible to provide developers with the
> >> primitive that the combination of Shadow DOM and CSS Scoping provides.
> >> Namely a way to isolate a subtree from selector matching (of document
> >> stylesheets, not necessarily user and user agent stylesheets) and
> >> requiring a special selector, such as >>>, to pierce through the
> >> boundary.
> >
> > Sounds like a reasonable, and perhaps feasible thing to do, but the
> obvious question is "why?"
> >
> > The use cases I can think of are to provide the sort of thing we do with
> BEM today. Is the effort worth it, or are there other things I didn't think
> of (quite likely, given I spent multiple seconds on the question)?
> The benefit of this approach is that all the styling information will be
> in one place.  CSS cascading rules is already complicated, and having to
> consult the markup to know where the selector boundary is will be yet
> another cognitive stress.
> - R. Niwa
If it it necessary to reflect similar at the imperative end of things with
qsa/find/closest (at minimum) - and I think it is the least surprising
thing to do - then you've merely moved where the cognitive stress is, and
in a really new way... Suddenly your CSS is affecting your understanding of
the actual tree!  That seems.... bad.

Brian Kardell :: @briankardell :: hitchjs.com
Received on Monday, 12 January 2015 22:08:06 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:27:25 UTC