You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First off, Svelte is awesome. 😃 I love it; it's my favorite framework ever.
The fix to remove scoping via attributes (#1118) is awesome, but I already architected my Svelte/Sapper app to make all CSS selectors global, in order to make the CSS as tiny as possible. (I just trust myself not to allow class names to collide. It's not as bad as it sounds. 😉)
To achieve this right now, I have a script to run a regex before sapper build to add :global() to every CSS selector (and remove it when the build is done). Obviously this is less-than-ideal, and I would love to just have some kind of global: true option or something to make everything global-by-default.
In terms of how this works with shaking out unused CSS, again I am just trusting myself not to make that mistake. Already there are plenty of places where I'm injecting unknown raw HTML anyway, and so I would have to have some :global()s even if I were not using this script.
Thank you for making Svelte/Sapper! 😁
The text was updated successfully, but these errors were encountered:
First off, Svelte is awesome. 😃 I love it; it's my favorite framework ever.
The fix to remove scoping via attributes (#1118) is awesome, but I already architected my Svelte/Sapper app to make all CSS selectors global, in order to make the CSS as tiny as possible. (I just trust myself not to allow class names to collide. It's not as bad as it sounds. 😉)
To achieve this right now, I have a script to run a regex before
sapper build
to add:global()
to every CSS selector (and remove it when the build is done). Obviously this is less-than-ideal, and I would love to just have some kind ofglobal: true
option or something to make everything global-by-default.In terms of how this works with shaking out unused CSS, again I am just trusting myself not to make that mistake. Already there are plenty of places where I'm injecting unknown raw HTML anyway, and so I would have to have some
:global()
s even if I were not using this script.Thank you for making Svelte/Sapper! 😁
The text was updated successfully, but these errors were encountered: