svelte-lexical
svelte-lexical copied to clipboard
Scope CSS to component
When I use the SvelteKit example in my own SvelteKit project, the CSS from svelte-lexical gets applied to all the pages on my site. Ideally it should only be applied to the svelte-lexical component.
Hi @DePasqualeOrg , I don't want to scope the CSS to the component because it is a library. Scoping styles to the component will take away the ability of library users to style the components.
But I also understand your problem. Could you identify a css selector that is impacting other pages on your site? Maybe I need it include a prefix for my CSS classes (it is already done for theme folder CSS)?
Ah, I see. Disabling the styles in the body selector or moving them to the .editor-shell selector seems to solve most of the problems for me at first glance.