this post was submitted on 13 Feb 2024
212 points (97.3% liked)

Programming

17022 readers
247 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] snowe@programming.dev 19 points 7 months ago (21 children)

I've been saying this for years. My site only has a few lines of javascript. the rest is pure html and css, and it's very simple. https://tylerthrailkill.com

[–] nitefox@sh.itjust.works 6 points 7 months ago (19 children)

Your theme toggle is confusing, it shows the sun when the dark mode is enabled and vice versa

[–] qaz@lemmy.world 8 points 7 months ago (1 children)

It did nothing when clicking it the first time and only changed the second time I clicked it

[–] snowe@programming.dev 6 points 7 months ago

I've wondered what this problem was for years but never cared to figure it out, because it always resolved after the first button press (just refresh the page and it all works properly). turns out it is something wrong with my use of local storage to save your theme state. if you don't have the key in local storage then it does what you mentioned. I just need to switch this to prefers-color-scheme anyway.

load more comments (17 replies)
load more comments (18 replies)