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
I'm using svelect in a svelte 5 app under the Skeleton (https://skeleton.dev) framework and I'm having some issues with the styling. In particular, the css does not use class based styling, rather everything is done with css variables.
When I modify the variables, there's no good way to have a dark mode variant. ie. --sv-bg="white dark:black" is not going to work. I think you could use a version with class variables instead, or alternatively you need to double up the css variables to include a dark variant (eg. --sv-bg and --sv-bg-dark).
My current workaround is to detect dark mode and change the value (i.e. --sv-bg={is_dark ? 'black' : 'white'}) -- not the best approach I think.
OR I'm doing this totally wrong and I haven't read the documentation properly. Any ideas on how to deal with dark mode?
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
I'm using svelect in a svelte 5 app under the Skeleton (https://skeleton.dev) framework and I'm having some issues with the styling. In particular, the css does not use class based styling, rather everything is done with css variables.
When I modify the variables, there's no good way to have a dark mode variant. ie. --sv-bg="white dark:black" is not going to work. I think you could use a version with class variables instead, or alternatively you need to double up the css variables to include a dark variant (eg. --sv-bg and --sv-bg-dark).
My current workaround is to detect dark mode and change the value (i.e. --sv-bg={is_dark ? 'black' : 'white'}) -- not the best approach I think.
OR I'm doing this totally wrong and I haven't read the documentation properly. Any ideas on how to deal with dark mode?
The text was updated successfully, but these errors were encountered: