Open littlefreak3000 opened 1 month ago
This is actually a weakness in svelte—it doesn't trace through to "see" the component's prop corresponds to an eventual classname.
You can work around it via the :global selector.
Or, if it is something that scoping is very important, IIRC you can locally scope a class that has a child :global selector:
<div class="this”>
<SomeComponent class="left" />
</div>
<style>
.this :global(.left) {
...
}
</style>
Given the code above .left and .right css are not exported as svelte thinks they are unused.