▲ | amadeuspagel 4 days ago | |
> React, Vue, Svelte. They all put components at the core. Scoped logic. Scoped templates. Scoped state. Then we hand them a stylesheet that’s global, cascading, and inherited by default. I don't know about react and vue, but svelte has a style tag that's scoped to the component. | ||
▲ | fkyoureadthedoc 4 days ago | parent | next [-] | |
Vue has had scoped css for a decade. I was very pleased moving to Vue from zope templates and jQuery spaghetti. | ||
▲ | alternatex 4 days ago | parent | prev [-] | |
All of them have both global and component-scope styles. Not having that flexibility would make a UI framework not viable for modern web dev. Just like with any code, you want to scope as much as possible, but an escape hatch is essential to avoid hacks for those edge cases. |