Skip to content

Added dark mode support #59

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

Merged
merged 6 commits into from
Oct 29, 2023
Merged

Added dark mode support #59

merged 6 commits into from
Oct 29, 2023

Conversation

shinwookim
Copy link
Contributor

Added dark mode support that:

  • Pulls from user's device preference (using media queries)
  • Save user preferences
  • Simple toggle via Navbar
image

@sivaraam
Copy link
Member

sivaraam commented Aug 23, 2023

Thanks a lot for the PR!

A few comments:

Card shadow

The shadow for the cards don't seem visible in dark mode. Could you look into possibility of tweaking them ?
image

Toggle icon size

Also, the toggle icon seems rather small. Would it be possible for you to use an icon that's easily noticeable. For example, the icons used by Docusaurus seem good.

Dark mode friendly colours

The blue, green and red in the page could be replaced with their dark mode friendly variants in dark mode. Could you look into them ?

@shinwookim
Copy link
Contributor Author

shinwookim commented Sep 2, 2023

I've (hopefully) fixed the issue with the card shadows; and I've tried to modify the toggle buttons as well.

The color issue is a bit more tedious, since we are using a version of Bootstrap served from a CDN. The only thing I could think of is manually overriding all the classes with the new colors, but at that point, I think it would be better to bump bootstrap to 5.3 which supports dark mode colors natively (unless anyone has better suggestions, of course).

@sivaraam
Copy link
Member

sivaraam commented Sep 14, 2023

I think it would be better to bump bootstrap to 5.3 which supports dark mode colors natively (unless anyone has better suggestions, of course).

If the upgrade does not significantly affect the way the site is rendered, feel free to proceed with that 👍🏼

@shinwookim
Copy link
Contributor Author

Apologies for the late PR.
Rather than attempting to bump Bootstrap (which broke a few things), I manually went in and modified the colors for the dark mode.

Please review and let me know if I missed any colors.

@sivaraam
Copy link
Member

sivaraam commented Oct 15, 2023

Hey @shinwookim ! Thanks for the update. You changes are looking great on Firefox. Unfortunately, for some reason I don't see them reflecting on Chrome. See screenshots below:

Screenshot 1

image

Screenshot 2

image

Could you look into why that is the case ?

@shinwookim
Copy link
Contributor Author

It should now be working in chrome! (Appears that chrome did not support the latest css features)

@sivaraam
Copy link
Member

sivaraam commented Oct 29, 2023

Looks great now on Firefox and Chrome. Thanks much for your contribution! 🙂

@sivaraam sivaraam merged commit 14937d0 into commons-app:master Oct 29, 2023
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