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

feat: dark theme #525

Closed

Conversation

ExampleWasTaken
Copy link
Contributor

Summary of changes

Introduces support for @prefers-color-scheme: dark for surfaces with white background.

Screenshots(if applicable)

dark_theme_1.mp4
dark_theme_2.mp4

Copy link

vercel bot commented Nov 2, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
website ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 2, 2024 7:33pm

@NathanInnes
Copy link
Member

It would be much more efficient if this was done at the higher level, this conflicts with the whole hard set themes of light and dark, a bigger rework should be done in order to achieve this more cleanly.

@ExampleWasTaken
Copy link
Contributor Author

ExampleWasTaken commented Nov 8, 2024

I agree that my implementation is inconsistent with the theme prop of the <Section> component. This is because the theme prop simply sets a dark background with white foreground and vice versa. This doesn't allow for different backgrounds in either theme. In fact, Donate.tsx seems to have the same problem.

Furthermore, setting a hard-coded theme does not support @prefers-color-scheme.

In my opinion, using a hard-coded theme as is done at the moment, defies tailwind's dark: property that natively supports @prefers-color-scheme and/or a separate toggle while also allowing individually styled components.

Based on this, I would suggest a refactor to remove the theme prop from the <Section> component and instead using tailwind's dark: variant on each individual component. As outlined above, this would allow for native @prefers-color-scheme support, as well as a toggle (if that is ever wanted).

@NathanInnes
Copy link
Member

Would be nice to keep our light sections as is as its part of the design and clearer to differentiate sections from one another, if we want an implementation of dark mode and have it be beneficial, I think we should approach the NOTAMs posts for it and allow a dark reader to be available with a toggle switch.

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