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

Re: Shadow tree style isolation primitive

From: <chaals@yandex-team.ru>
Date: Tue, 13 Jan 2015 15:15:37 +0300
To: Ryosuke Niwa <rniwa@apple.com>
Cc: Anne van Kesteren <annevk@annevk.nl>, "www-style@w3.org" <www-style@w3.org>, WebApps WG <public-webapps@w3.org>
Message-Id: <24371421151337@webcorp02e.yandex-team.ru>

13.01.2015, 00:57, "Ryosuke Niwa" <rniwa@apple.com>:
>> š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.

Sorry, I'm dense this morning for sure. Why would all the styling information be in one place? I'm still thinking from the model of BEM, where the benefit is that for a particular block you can collect everything (styling, scripts, whatever magic you want - or just a couple of plain tags and 4 words) in one place, and the different pieces get stitched together without having to worry about how they will impact each other because ordinarily they wont.

(The corresponding "cognitive price" is that if you *want* to do things page-wide across a bunch of different blocks, you need to think more).

Could you provide a slightly longer-form answer for dummies (i.e. me) please?


Charles McCathie Nevile - web standards - CTO Office, Yandex
chaals@yandex-team.ru - - - Find more at http://yandex.com
Received on Tuesday, 13 January 2015 12:16:08 UTC

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