you dont need JS for dark/light https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/At-rules/@media/prefers-color-scheme
Hi, thank you for responding!
Regarding 'prefers-color-scheme', I believe I'm already achieving that with 'color-scheme: light dark' -- if I visit the page from a regular browser, it will load in dark by default. If I visit from a privacy preserving browser that requests 'light' regardless of operating system, it will load in light by default.
What I don't think I can do in css is store a user's per-site preference so that if their system requests light but they click dark, they won't have to click 'dark' again next time.
also i have never heard of <nav-container> before and i also couldnt find anything when googling it, do you have documentation??
I only learned about this very recently too but it's just shorthand for the css rule of the same name.
I uploaded the formatted code to codeberg to make it easier to read, but you can see the selector here:
https://codeberg.org/inert_aesthetic/homepage/src/branch/master/index.html#L98-L125This lets me write <nav-container> but I believe the semantic effect is no different to <div class="nav-container">.
It reminds me of jsx which I'm very comfortable with.