Keep waiting for web developers to realize that Shadow DOM is the "modules for CSS" they've all been waiting for and _freak out_.
-
-
Replying to @slightlylate
Don't elements in Shadow DOM inherit styles from the parent document? So for many: still no good.
1 reply 0 retweets 0 likes -
-
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 @heydonworks1 reply 1 retweet 2 likes
-
Replying to @slightlylate
Thank you for the tips and resources, Alex. Shadow DOM + all: initial is probably what I'm after. I like doing things w/o frameworks :-)
1 reply 0 retweets 3 likes - 2 more replies
New conversation -
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.