Can you expound a little, my friend? I struggle with this...
-
-
CSS w/o Shadow DOM puts all rules and all elements into the same namespace for rule resolution. This creates all sorts of problems; specificity breaks down at scale.
1 reply 0 retweets 5 likes -
Replying to @slightlylate @stefsull and
Shadow DOM is like a function: local stuff is local, which reduces burden on global namespace while making internal concerns easier to reason about.
1 reply 0 retweets 5 likes -
Yes, that I understand. It was your Assembly reference. ;) Regardless, I've helped architect a CSS framework for an Enterprise company using principles that have avoided the things that scare y'all about CSS.
1 reply 0 retweets 4 likes -
Replying to @stefsull @slightlylate and
But Shadow DOM works opposite of how a well-architected framework works. And it's not compatible in many ways.
2 replies 0 retweets 3 likes -
Replying to @stefsull @slightlylate and
It feels like making it all local takes the C out of CSS. In fact, in some ways it kinda reverses it. CSS is really okay. It's not an untamed beast, just a different, very powerful beast. Whatever. It is what it is. I just wish we could finish that spec about theming. ;)
1 reply 0 retweets 4 likes -
I think of it as returning CSS to what it's good at: styling small trees. By making components responsible for their own internal
state, reduce the "bleed through" that makes managing styles so painful.
Good progress being made on part/theme: https://www.chromestatus.com/feature/5763933658939392 …2 replies 0 retweets 2 likes -
Thanks for this. I had only read the one on Tab's site. There certainly is a strong need for this. For me the issue is that it seems expectation is the same person is building the component & writing the CSS. The component needs to be composed to know what parts are inside.
1 reply 0 retweets 0 likes -
Replying to @stefsull @slightlylate and
So CSS has to be handled post "part-marking"? (Sorry, Twitter makes it hard to have a meaningful discussion. LOL) I need coffee...
1 reply 0 retweets 0 likes -
I don't think so? Each component author has some public stuff and (usually) lots of private stuff. SD + part/theme let you keep private stuff private, and allow that styling to be about a much smaller shadow tree.
1 reply 0 retweets 0 likes
...at which point the public stuff is a choice and not an accident. Lower default flexibility (although it's there in script if you really need it), but improved composability. Part/theme are spec fiction today, but custom properties can get you much of that already.
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.