13.01.2015, 00:57, "Ryosuke Niwa" <rn...@apple.com>:
>>  On Jan 12, 2015, at 4:13 AM, cha...@yandex-team.ru wrote:
>>
>>  09.01.2015, 16:42, "Anne van Kesteren" <ann...@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?

cheers

--
Charles McCathie Nevile - web standards - CTO Office, Yandex
cha...@yandex-team.ru - - - Find more at http://yandex.com

Reply via email to