-
Notifications
You must be signed in to change notification settings - Fork 0
Feature/dark mode #91
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
Conversation
|
src/App.css
Outdated
| min-height: 48px; | ||
| } | ||
|
|
||
| .footer { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the footer footer was removed in App.tsx, this whole block should be removed
But per our discussion yesterday, could we add a 128px margin bottom on the Viewer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I just removed the footer rule, and add a bottom margin to the Viewer component.
I still dont really understand that bottom margin tbh, but it's on there now :)
rugeli
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! With this code structure, it should be easy to switch color palettes once we get one from UX.
only one thought on the lack of a toggle: users with their prefers-color-scheme default to light might still want to switch to dark occasionally, like for viewing the result in embedded viewer. we can discuss next time whether we'd like to have a button or not.
Problem
Advances #84
Solution
This PR adds a theme provider for antd, simplifies global styling where possible, and introduces media queries to check for the user's preferences on dark vs light theme.
No manual option to set the theme is provided.
I didn't cross reference with any design files so the styling dtails here need to be updated/confirmed, but as a template for dark/light mode and use of antd theming, this works.
As for global styling, while theming mostly covers colors, I noticed some odd spacing and overflow here and there so I tried to tighten up the layout a bit.
For starters there was a
Footercomponent with no content, and fixed dimension, which was leading to overflow, so I just removed it.Also the
.app-containerwraps everything, so I didn't see the purpose of havingdisplay: flexalso set onbodyso I changed it todisplay: blockand removed the min height and width.