Skip to content

Conversation

@timsavage
Copy link
Contributor

This change adds a dark mode theme and the required code infrastructure for switching themes.

The theme is my best interpretation of a dark mode version of the current theme (only changes colours).

The change includes a switcher widget at the top of the page to select between OS Default, Light and Dark modes.

The display mode is persisted (in local storage) between loads, with the default mode based on your current operation system (or browser) theme.

Theming is utilising the light_dark function.

Copy link
Member

@t-paul t-paul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks nice. I'm personally not a huge fan of dark mode, but this seems to work quite well. I guess moving forward we need to consider the switch when adding new images.

One issue remains: The icons e.g. on the bottom of the home page or on top of the documentation page are almost invisible. I believe those are all font-awesome glyphs, so I hope it's easy to tag them with a class that is switching colors too.

@timsavage
Copy link
Contributor Author

I think some of the icons where using transparency to differentiate themselves.

I'll take a look and push the changes.

@timsavage timsavage requested a review from t-paul March 17, 2025 12:49
Copy link
Member

@t-paul t-paul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice. Thank you!

@t-paul t-paul merged commit 2942f98 into openscad:main Mar 17, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants