AI-powered
podcast player
Listen to all your favourite podcasts with AI-powered features
CSS Scoring: A Technique Used to Override Each Other's CSS
Svelte uses a technique called scoping. It's very similar to something like styled components, which also gives your CSS random class names. Svelte by default in their scoped CSS each time you write CSS in a component, it's scoped to that component and a bunch of random classes has been added to it. They do that because it generates a unique class. The system allows people to build big systems without having to worry about how they're going to mess up somebody else's thing. And I don't know what your background out there in radio land is like, but me personally, I've worked on projects and teams when somebody overwrites your thing with a class that