CSS variables are soooo good, if they didn't have that in vanilla CSS right now I'd probably be aboard the SCSS train :P
I learned the CSS variable set for light/dark theme from this page!
https://dev.to/whitep4nth3r/the-best-lightdark-mode-theme-toggle-in-javascript-368f
And there's another way to do it without any javascript:
https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/light-dark
You can even do light/dark modes with just HTML and a meta tag now?
https://stackoverflow.com/questions/72922557/light-dark-mode-in-html-without-css-only-html
Def gonna do more research into these lightweight methods so it's easy to recommend them to people who even more beginner level than I am!
no subject
Date: 2024-09-24 01:43 am (UTC)CSS variables are soooo good, if they didn't have that in vanilla CSS right now I'd probably be aboard the SCSS train :P
I learned the CSS variable set for light/dark theme from this page! https://dev.to/whitep4nth3r/the-best-lightdark-mode-theme-toggle-in-javascript-368f
And there's another way to do it without any javascript: https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/light-dark
You can even do light/dark modes with just HTML and a meta tag now? https://stackoverflow.com/questions/72922557/light-dark-mode-in-html-without-css-only-html
Def gonna do more research into these lightweight methods so it's easy to recommend them to people who even more beginner level than I am!