Date: 2024-09-24 01:43 am (UTC)
tempural: smiling red dachshund with eyes closed (Default)
From: [personal profile] tempural

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!

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

Profile

smallweb: A drawing of a small spiderweb between branches (Default)
All Things Small Web

June 2025

S M T W T F S
12 345 67
891011121314
15161718192021
22232425262728
2930     

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jun. 9th, 2025 10:42 am
Powered by Dreamwidth Studios