On Mon, Jan 12, 2015 at 7:23 PM, Ryosuke Niwa <rn...@apple.com> wrote:

> On Jan 12, 2015, at 4:16 PM, Brian Kardell <bkard...@gmail.com> wrote:
>> Sure, here are some use cases I can think off the top of my head:
>>    1. Styling a navigation bar which is implemented as a list of
>>    hyperlinks
>>    2. Styling an article in a blog
>>    3. Styling the comment section in a blog article
>>    4. Styling a code snippet in a blog article
>> None of these scenarios require authors to write scripts.
>> - R. Niwa
> I'm sorry, this might be dense but as use cases go those seem
> incomplete.... I believe you intend to illustrate something here, but I'm
> not getting it... Is the idea that the nav bar wants to deliver "this is
> how I am styled" without interference from the page, potentially through
> some assembly on the server or preprocess or something?   Or it is just
> like "this is actually really hard to manage" with CSS and here's
> potentially a way to make it 'scope' easier?
> It's both that the navigation bar wants to have its own set of CSS rules
> and doesn't want to get affected by other CSS rules; and it's hard to
> manage a large number of CSS rules manually without an encapsulation
> mechanism like a style isolation boundary [1].
> [1] http://stackoverflow.com/questions/2253110/managing-css-explosion
> - R. Niwa
Yeah, ok, that's what I thought you meant.  Professionally, I come up with
this case all the time and the number of cases where I want JavaScript ops
to inadvertently poke into me is 0.  Let's use your menu case, lets say
that I have a class="title" on some menu elements and use id="main" -
because, hey, that's one reason we like style isolation, we don't need to
invent complex strategies.  Fairly high odds that someone else in the page
will qsa those and do something bad to me inadvertently.  Having those
respect the same boundary for the same seems very, very natural to me.

Quick note based on some of your other responses - I actually didn't see
any proposal in the suggestions about TreeScope or a non-parent/child link
connector or something that talked about insertion points... I think that
is a secondary question, as is event retargeting?  My comments are
literally limited to the bare minimum stuff above without discussion of

Brian Kardell :: @briankardell :: hitchjs.com

Reply via email to