-
-
Notifications
You must be signed in to change notification settings - Fork 226
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
Enable dark theme #358
base: bundlephobia
Are you sure you want to change the base?
Enable dark theme #358
Conversation
…ss into classes in preparation for dark theme.
- Added react context to communicate theme state - Added a provider component to manage theme state - Added `_app.js` to allow theme to persist between pages.
… GitHub logo and quick links.
1000cf5
to
36f9b69
Compare
@pastelsky Hello, there was a GitHub issue for implementing a dark theme but I can't seem to find/access it anymore. I wanted to attach this PR to it. It is issue #297 I believe with a label of Strangely, GitHub shows there are 3 open issues for this label but I can't see them when I click through. Do you have any idea what has happened? 🤔 😅 |
Awesome, can't wait to get this merged. |
7572841
to
1d11eaf
Compare
Is there any reason why CSS variables aren't used? Seems like it would reduce both the amount and complexity of the code by a lot, and I highly doubt any users of this page use an unsupported browser 😅 Support for global (OS-level) theme and/or remembering the user setting on the page would also be really nice. I'll be happy to assist with any of these if needed! 😊 |
High-level description of the approach to enable dark theme:
_app.js
(nextjs docs) to control page initialisation so that the front-end state (e.g. theme choice) persists across pages.dark-theme
) on the body element that triggers the dark theme.dark-theme
CSS class to override the normal styles.Things considered but not implemented
Closes #297.
Screenshots