In a parent component I am passing down a CSS class to child component.
Parent.svelte
import Child from .Child<div class="parent-component-class"> <Child childClass="child-component-class"></div>
Child.svelte
export let childClass;<div class={childClass}></div>
I want to be able to style the child-component-class
in the <style>
tag of a parent component. The only way I found how to do it is using a "global" prefix:
<style lang="scss">:global(.child-component-class) { /* some styles */}</style>
But that is not what I want. I want the styling to stay scoped inside the component Parent and down to it's child components. Any suggestions?