Any alternative to repeatedly importing your SASS color palette?
Hi everyone, I'm working on a svelte project with sass.
I have a partial
As the project grows, the number of
For testing, I added
In Chrome DevTools: Coverage tab I noticed that this increases the resultant css file, as well as the unused CSS percentage.
So I assume it's bad practice to repeatedly import a partial such as
I have a partial
_colors.scss that has a general palette used in multiple components.As the project grows, the number of
@use colors will increase. For testing, I added
@use colors/typography/themes to a component that doesn't need any of them. In Chrome DevTools: Coverage tab I noticed that this increases the resultant css file, as well as the unused CSS percentage.
So I assume it's bad practice to repeatedly import a partial such as
_colors.scss into multiple components. Is the best alternative using css var() instead? I do like the brevity of a simple $gray over custom properties.