• qaz
    link
    84 months ago

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

    • snoweM
      link
      fedilink
      64 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.