No man, I just hate global variables ;-) But seriously, Shadow DOM is the answer to CSS in the same way that "structured programming" is the answer to assembly.
-
-
Can you expound a little, my friend? I struggle with this...
1 reply 0 retweets 1 like -
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 -
Replying to @slightlylate @stefsull and
And is CSS really ok? There has been an explosion of tools whose primary value is that they turn off specificity and the cascade (Inc CSS-in-JS tools). Teaching the "C" is a nightmare. Folks rightly want fewer foot-guns.
4 replies 0 retweets 5 likes -
I think CSS is fine, but I've worked with it for about 15 years. I understand it & I appreciate how it works. Most of these tools feel like they're just made for people that don't want to understand CSS & they try to make it more like JS. But I realize I'm probably a minority.
2 replies 0 retweets 10 likes
I have a hard time arguing folks are wrong when they want to localize the effects of their decisions. Basically every programming abstraction is this because it makes complexity approachable.
-
-
Replying to @slightlylate @stefsull and
And should we have to teach all of CSS's crazy? For most problems, responsive breakpoints + grid + flexbox should let an app "work" enough that developers can focus on other stuff (like how to re-invent list virtualization the N+1th time





)1 reply 0 retweets 3 likes -
Can't use grid yet. Still too much IE11 to make it worthwhile since flexbox works for most things. And maybe I shouldn't use my outside voice, but I LOVE CSS. Maybe I'm the crazy. LOL
2 replies 0 retweets 7 likes - 6 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.