Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic switching between light + dark themes #8

Closed
marzer opened this issue Sep 6, 2022 · 5 comments
Closed

Dynamic switching between light + dark themes #8

marzer opened this issue Sep 6, 2022 · 5 comments
Labels
enhancement Enhancement of an existing feature.

Comments

@marzer
Copy link
Owner

marzer commented Sep 6, 2022

Per title. Discussed in #5.

An implication of this is that the m.css light theme looks quite different from the dark one (i.e. it's not just a pallette swap); for a dynamic switch to make visual sense a new light theme is necessary, one that is a pixel-perfect match for the dark one.

(The m.css light theme is quite nice, though, so I'd still keep it under a different name).

@marzer marzer added the enhancement Enhancement of an existing feature. label Sep 6, 2022
@mosra
Copy link

mosra commented Sep 6, 2022

Related: mosra/m.css#133

I have the exact same TODO, to make a the light theme actually a variant of the dark one, and rename the light theme to something else entirely ("book"? whatever). One possible candidate for a light theme is used at https://aihabitat.org, but even that one would still need to get finished, together with FB branding/colors removed.

@marzer
Copy link
Owner Author

marzer commented Sep 6, 2022

Well if I ever get around to actioning this I'll happily contribute it back to m.css, rather than just have it live in poxy :)

@marzer
Copy link
Owner Author

marzer commented Sep 7, 2022

So, I started doing a thing...

image

Obviously a long way to go, heh. @mosra did you do any special design magic to come up with the dark theme's colour palette, or just fiddling over time?

@marzer marzer closed this as completed in c508fdb Sep 7, 2022
@marzer
Copy link
Owner Author

marzer commented Sep 7, 2022

Alright, the proof-of-concept of my light theme is now ready for you to have a look if you're interested, @mosra:

I tried to keep it tonally consistent with the dark theme, but there's probably a few obvious places that still need adjusting. If you think this is worth iterating on I'll be happy to contribute it to m.css when I get back from my vacation.

@mosra
Copy link

mosra commented Sep 7, 2022

did you do any special design magic

I used Inkscape to fiddle with the pallete, especially for the various colored components, and then copied the colors to CSS. In https://github.com/mosra/m.css/tree/master/artwork there's colors-dark.svg you can start from.

After that, easiest is to build the m.css website locally (with Pelican) and switch the CSS to a light one in the config. Then look at various hidden test pages such as https://mcss.mosra.cz/css/components/test/ and iterate until your eyes stop bleeding :D

If you make a PR, that'll be the most amazing, but unfortunately I won't be able to look into this anytime soon. October hopefully?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement of an existing feature.
Projects
None yet
Development

No branches or pull requests

2 participants