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

Re: Shadow tree style isolation primitive

From: Brian Kardell <bkardell@gmail.com>
Date: Wed, 4 Feb 2015 09:46:46 -0500
Message-ID: <CADC=+jeSSwCO8V434t6wUPEfhw6igYjh4T9KRxa9OukEKbhspw@mail.gmail.com>
To: Olli Pettay <olli@pettay.fi>
Cc: Dimitri Glazkov <dglazkov@google.com>, "www-style@w3.org" <www-style@w3.org>, WebApps WG <public-webapps@w3.org>
On Wed, Feb 4, 2015 at 7:56 AM, Olli Pettay <olli@pettay.fi> wrote:

> On 02/03/2015 04:22 PM, Brian Kardell wrote:
>> On Tue, Feb 3, 2015 at 8:06 AM, Olli Pettay <olli@pettay.fi <mailto:
>> olli@pettay.fi>> wrote:
>>     On 02/02/2015 09:22 PM, Dimitri Glazkov wrote:
>>         Brian recently posted what looks like an excellent framing of the
>> composition problem:
>>         https://briankardell.__wordpress.com/2015/01/14/__friendly-
>> fire-the-fog-of-dom/
>>         <https://briankardell.wordpress.com/2015/01/14/
>> friendly-fire-the-fog-of-dom/>
>>         This is the problem we solved with Shadow DOM and the problem I
>> would like to see solved with the primitive being discussed on this thread.

> If ShadowRoot had something like attribute DOMString name?; which defaults
>> to null and null means deep(name) or deep(*) wouldn't be able
> to find the mount, that would let the component itself to say whether it
> can deal with outside world poking it CSS.

That.... actually.... doesn't sound crazy to me.  I mean, it actually fits
pretty nicely into the conceptual model I think and it would add a whole
additional layer of possible protection which is explainable in sort of
"todays terms" with minimal new 'stuff'... the combinator is new anyway and
you're dealing with mount in what seems like a good way there.  I think I
like it.


> [Perhaps a bit off topic to the style isolation]
> In other words, I'm not very happy to add super complicated Shadow DOM to
> the platform if it doesn't really provide anything new which
> couldn't be implemented easily with script libraries and a bit stricter
> coding styles and conventions.

I'd suggest that you're radically over-stating - you really can't "easily
solve this problem", even with much stricter coding style, as I explained
in that post.  This is a problem and even without named mount protection
above, this would be a giant leap forward because the -default- thing is to
not match.  Doing 'right' by default is a giant win.  That said, as I say
above, I kinda like the named mount idea...

Brian Kardell :: @briankardell :: hitchjs.com
Received on Wednesday, 4 February 2015 14:47:14 UTC

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