Re:Replacing JavaScript with Just HTML
by tisc on Sunday December 28, 2025 @02:47AM
(#46409255)
Why would you build a switch instead of relying on the user’s system settings? The only reason I can imagine is that your dark/light mode is not usable/readable so it forces the user to switch
[ Parent
| on HN ]
I often use different light/dark settings between apps and my system. Just because I want system UIs to be dark, for example, doesn't mean I want to read long pages of white-on-black prose on your blog.
Re:Replacing JavaScript with Just HTML
by trinix912 on Sunday December 28, 2025 @05:17AM
(#46409996)
Seconded. Just because I like to have the browser toolbar dark and GitHub dark doesn't mean I also want to read lengthy articles (LWN) in thin white text on a black background.
Re:Replacing JavaScript with Just HTML
by echoangle on Sunday December 28, 2025 @10:42AM
(#46411844)
Then you still don't need a switch on every website. Just set the browser to display the light version and have it ignore the system setting.
That's what we need, for browsers to have a setting to remember our light/dark preferences per-domain.
Re:Replacing JavaScript with Just HTML
by yurishimo on Sunday December 28, 2025 @05:39AM
(#46410094)
Having it default to the users preference is nice, but you should still provide an override. I sometimes use my browser in light mode while my OS is dark mode. Many times, I find the contrast for dark mode websites too low unless I’m in a totally dark room.
Re:Replacing JavaScript with Just HTML
by wiseowise on Sunday December 28, 2025 @07:25AM
(#46410579)
Because I don't want to toggle my whole system theme based on one special website.
My specific usage is a site to host my own internal training content.
I want to read it in dark mode and give users that option, but I want to present it in light mode because dark mode suffers poorly from video compression when screen sharing.
I currently have a JS toggle for it which uses local browser storage, but ditching JS would be nice if possible.