-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Description
Describe the problem
My case: Imagine you import a component from a 3rd party module (custom Select for example) and want to style it contextually (for example setting width for just one component/page) using classes within that component and the author didn't expose the particular value as a css variable. You are out of luck.
You either have to fork the module to add the variable, or add a global id just so you can target it in a global stylesheet, which is not the place you will look for the value at a later time. Either option is not developer friendly.
There are multiple github issues and stackoverflow questions about how to get around this, so there is clearly demand. I feel like this is a case where Svelte might be too opinionated.
Am I missing something? What is the case for the purge being mandatory?
Describe the proposed solution
The purging of "unused CSS" should be just a warning, or svelte should provide a configuration option to change the default behaviour.
Alternatives considered
Considered polluting the global css (by using :global). Not an option for anyone who uses Svelte to achieve a well organised code.
Importance
i cannot use svelte without it