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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crystal docs dark theme #9084

Closed
j8r opened this issue Apr 15, 2020 · 6 comments
Closed

Crystal docs dark theme #9084

j8r opened this issue Apr 15, 2020 · 6 comments

Comments

@j8r
Copy link
Contributor

j8r commented Apr 15, 2020

Some developers likes dark theme - more gentle on the eyes when codding at night 馃槃

The CSS media prefers-color-scheme can be used for auto-detection o the light/dark theme user preference

The prefers-color-scheme CSS media feature is used to detect if the user has requested the system use a light or dark color theme.

Other similar tools supporting it:

@straight-shoota
Copy link
Member

straight-shoota commented Apr 15, 2020

Sure, sounds good enough to me.

But I would actually hold off on such non-essential features to the doc generator until we do a bigger refactor of the internal implementation. That will subsequently also make it easier to iterate on frontend features.

@Blacksmoke16
Copy link
Member

Custom Properties could also be a cool future addition. It would abstract the coloring of things to a single CSS file that could be overridden to allow for custom styling.

@oprypin
Copy link
Member

oprypin commented Jan 18, 2021

https://github.com/oprypin/mkdocstrings-crystal is an external doc generator that exposes theme customizations, including dark mode via https://squidfunk.github.io/mkdocs-material/setup/changing-the-colors/#color-scheme

@j8r j8r closed this as completed Jan 18, 2021
@willhbr
Copy link
Contributor

willhbr commented Jun 29, 2021

I was just about to file a duplicate of this. Would a PR adding a dark mode to the CSS be accepted?

I spent a few minutes tinkering with the styles to see what this could look like:

image

This would obviously require a bit more thought, but I think this direction would save some people's eyes at night.

@chances
Copy link
Contributor

chances commented Dec 16, 2021

@willhbr Are your CSS sources available anywhere?

@willhbr
Copy link
Contributor

willhbr commented Dec 16, 2021

I made that screenshot by tinkering directly in the browser, and didn't save them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants