DEV Community

Discussion on: Theming in Svelte with CSS Variables

Collapse
 
ambrt profile image
Rik

Some time ago i was looking for a way to switch themes in SvelteKit and ended up in having separate CSS files in public dir and just linking them.
It sucked b/c it needed full webpage reload to get new css to be applied.

So this solution with base64'ing content might do that automatically.
(I think getting css file as text and sending whole text as base64 might work).