@hitstun@fedia.io just wanted to check with you as I think I misunderstood your request for a CSS var for color scheme. Do you mean you’d like something like class=theme--scheme-[light/dark] on the body class? For instance when the user selects tokyo night, solarized dark, dark, kbin it’s theme--scheme-dark and when light or solarized light, theme--scheme-light to save you from having to type out selectors for each theme?

And I did investigate the magazine description federation issues. Think I have an idea, I’ll make an issue for it and it will probably be the next thing I work on after my current open PRs.

#Mdev

  • e-five@kbin.runOPM
    link
    fedilink
    arrow-up
    2
    ·
    1 year ago

    @hitstun@fedia.io I was planning on implementing this this weekend but realized before I started that I’d hit a snag. When the theme is theme--default or theme--solarized, I don’t actually know if the color scheme is light or dark, it all depends on the user’s system settings (if they prefer light or dark). I haven’t been able to think of a way around that, since CSS isn’t really a logic/programming language I can’t do things based off of it. The most I could think of is setting like theme--scheme-unknown and then updating it via javascript after page load. That has the original problem when it was JS based though, in that it wouldn’t be set until the page fully loaded due to the JS having defer on it. But maybe just having the scheme on all other settings is good enough? I don’t have metrics but I bet tons of users are just theme--default though, since it’s the, well obviously, default state.

    • hitstun@fedia.io
      link
      fedilink
      arrow-up
      0
      ·
      1 year ago

      @e-five@kbin.run Ah, that makes sense now. I wondered why the Solarized theme has a light background on my desktop but a dark background on my phone. Those match my dark mode preferences on those browsers. I thought I messed up my CSS somewhere.