It is common practice to scope CSS styles for components like this:
.my-component-01 h1 { ... }
.my-component-01 h2 { ... }
However, Svelte takes a different approach by applying the styles directly to the tags:
h1.svelte-hlsza1{color:orange}
h2.svelte-hlsza1{background:yellow}
Would it be better to actually wrap these styles under a specific class (the top method)? This way, in the HTML markup, you would only need to include the class once:
<div class="svelte-hlsza1">
<h1> ...
<h2> ...
This approach eliminates the need to repeat the class name every time and maintains the same level of specificity: 1 class and 1 tag name.