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 19:59:02 -0500
Message-ID: <CADC=+jfCbf5xd1pyUJQVfMow3dtx1-pY7BAYE6oK2e69eSan5w@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 7:45 PM, Ryosuke Niwa <rniwa@apple.com> wrote:

>
> I understand your use case but please also understand that some authors
> don't want to write a few dozen lines of JavaScript to create a shadow DOM,
> and hundreds of lines of code or load a framework to decoratively isolate
> CSS rules in their pages.
>
> As far as I can tell, I am not talking about shadow dom or specifically
what authors would have to write... If I did, I didn't intend to do so.  I
am talking about how it is explained and where.  It could literally be as
simple as a single line of JavaScript for purposes of what I am discussing
- As anne mentioned earlier, it could just be a property of an element
potentially... Maybe you could even do with markup attribute.  I thought
that what we were discussing was how to isolate the simpler/potentially
less controversial bits of this.  Conceptually then, my point then is about
when you isolate to prevent accidental style leakage, it seems you nearly
always want to prevent qsa and traversal kinds of leakage too, and that it
wouldn't hurt you in some very rare case where you didn't explicitly *want*
it, as long as you can explicitly traverse the boundary with a combinator.



> 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
> those.
>
>
> What questions do you have with regards with insertion points and event
> retargeting?  Are you asking whether they should happen as a side effect of
> having a style isolation?
>

I'm saying that you can talk about isolation without insertion points or
event retargeting, which is what I got out of the thread topic.  Maybe I'm
wrong?


> I would just say that we feel event retargeting should be treated as a
> separate concern from style isolation.  I'm denying that a style isolation
> with event retargeting is a valid use case but there are use cases in which
> style isolation without event retargeting is desirable or retargeting needs
> to be implemented by frameworks.
>

Now I'm quite confused.  IIRC you are the one that brought up insertion
points earlier - was someone else talking about them?  In any case, I agree
with you, it's possible to have this conversation without those two as a
start and I'd suggest we do that.



>
> - R. Niwa
>
>


-- 
Brian Kardell :: @briankardell :: hitchjs.com
Received on Tuesday, 13 January 2015 00:59:31 UTC

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