3 ms·
You didn't have to leave the local context if you use very local stylesheets. Scoped CSS like shadow DOM, plus CSS text right with your component, helps a lot w
by spankalee 2y ago
You didn't have to leave the local context if you use very local stylesheets. Scoped CSS like shadow DOM, plus CSS text right with your component, helps a lot with this.
- wruza 2y agoStyle attribute lacks a selector (“color:red” vs. “.comp {color:red}”), forbidding the most useful use case. Shadow dom is an inspection nightmare used only by a few progressive web purists. Style.css is an untyped incoherent spaghetti. There’s no really good place for an element style in current implementation.
- krsdcbl 2y agoop is not talking about style atts, but referring to nesting inline `<style> @scope { ... }</style>` to declare vanilla css in the scope & context of specific DOM nodes
- wruza 2y agoIsn’t it a “limited availability” feature? Why would they use it?
- paulddraper 2y agoYeah, but `@scope` is only if you don't want to support Firefox.
- spankalee 2y agoNo, in taking about the native scoping you get with shadow DOM, which is awesome and not an "inspection nightmare".