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

Add dark/light mode #1018

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Add dark/light mode #1018

wants to merge 7 commits into from

Conversation

davis9001
Copy link

Added a dark and light mode, avoided FOUC, used Tailwind and CSS vars().

This might not be the cleanest implementation but as far as I can tell this works and will result in cleaner styling going forward. My biggest criticism of this would be the use of invert on the code blocks and the orama search. I tried to avoid that but I couldn't see any way around flashing some styles in some edge cases when trying to use the markdown and orama theme options.

Closes #817

@marvinhagemeister
Copy link
Contributor

marvinhagemeister commented Oct 16, 2024

Thanks for getting the ball rolling on this! Just checked out the branch locally and it looks great!

Screenshot 2024-10-16 at 11 40 25

The only thing I'd change is to keep the blue links. We don't have yellow anywhere in our color scheme. Same for the code blocks.

@donjo
Copy link
Member

donjo commented Oct 16, 2024

@davis9001 Thanks for all of this! Just noting that we're going to chat about this at our docs design meeting later this week and figure out how we want to move forward. Some of the things we'll want to figure out are whether additional colors should be added to our palette to help with the dark mode styles and how we want to handle the use of color inversion (like should we wait to release until we come up with manually selected dark mode colors).

@davis9001
Copy link
Author

The only thing I'd change is to keep the blue links. We don't have yellow anywhere in our color scheme. Same for the code blocks.

Excellent point! I added to the pull request to fix the links in the markdown blocks. I haven't fixed the code blocks yet, I think the best long term solution for that would be to override the styling coming from gfm.css.

Some of the things we'll want to figure out are whether additional colors should be added to our palette to help with the dark mode styles and how we want to handle the use of color inversion (like should we wait to release until we come up with manually selected dark mode colors).

Makes sense! In any case I would definitely recommend having a well documented style guide that includes both light and dark theme color schemes. Do let me know if there is anything I can do to help!

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.

Docs Dark Mode
3 participants