Don't elements in Shadow DOM inherit styles from the parent document? So for many: still no good.
-
-
-
Replying to @slightlylate
I have... Styling h2 affects h2s outside and inside shadow DOM instances due to inheritance. This doesn't worry me, but will others.
1 reply 0 retweets 0 likes -
Replying to @heydonworks @slightlylate
(sorry, not inheritance, moreso the cascade)
1 reply 0 retweets 0 likes -
Replying to @heydonworks
Now I'm very confused. Is this not the behavior your expect (see in Chrome or Safari)? https://output.jsbin.com/wewepud
2 replies 0 retweets 2 likes -
Replying to @slightlylate
So, I applied body { font-family: cursive } to that page...pic.twitter.com/Jbv9IBc1pj
1 reply 0 retweets 0 likes -
Replying to @heydonworks @slightlylate
There's no 'style encapsulation' as such, because Shadow DOM takes document styles. Basically, it's not like an iframe.
1 reply 0 retweets 2 likes -
Replying to @heydonworks
Oh, I see, you're looking for: css``` :host { all: initial; } ```
4 replies 1 retweet 5 likes -
Replying to @slightlylate @heydonworks
What parts of the shadow dom impl can't be achieved with a mix of the `all: initial ` property? i.e https://jsbin.com/xidomel/2/edit?html,output …
1 reply 1 retweet 0 likes -
Replying to @thysultan @heydonworks
A few things jump out: - you had to use `.namespace *` which isn't what you really want - still have to fight to build local styles.
2 replies 0 retweets 0 likes
At any meaningful scale, those two properties alone justify using SD. But the kicker is distribution & composition.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
& Web Standards TL; Blink API OWNER
Named PWAs w/
DMs open. Tweets my own; press@google.com for official comms.