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: respect OS or root class for dark mode #759

Merged
merged 4 commits into from
Jun 20, 2024

Conversation

bswags
Copy link
Contributor

@bswags bswags commented Jun 20, 2024

  • Change account kit's tailwind to respect OS level or class name dark mode
  • Have the demo app use the "light" classname to override the OS setting so that the toggle is always in control

Pull Request Checklist


PR-Codex overview

This PR introduces a light theme to the UI demo, adds dark mode support to Tailwind CSS, and updates the UI to toggle between light and dark themes.

Detailed summary

  • Added a light theme to the UI demo
  • Implemented dark mode support in Tailwind CSS
  • Updated UI to toggle between light and dark themes

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Copy link

vercel bot commented Jun 20, 2024

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

Name Status Preview Comments Updated (UTC)
aa-sdk-site ❌ Failed (Inspect) Jun 20, 2024 5:53pm

"@media (prefers-color-scheme: dark) { &:not(.light, .light *) }",
"&:is(.dark, .dark *)",
],
],
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is above the ...config so that the client apps can override it

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this also mean that dark mode must be enabled using the dark class?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nope, it handles both! so the OS preference or the class-based approach will work

Base automatically changed from tina/hook-up-variables to tina/ui-demo June 20, 2024 14:26
@bswags bswags force-pushed the brian/flexible-dark-mode branch from 5cca699 to 16d9c97 Compare June 20, 2024 17:51
@bswags bswags merged commit 4cef33f into tina/ui-demo Jun 20, 2024
4 of 5 checks passed
@bswags bswags deleted the brian/flexible-dark-mode branch June 20, 2024 18:55
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.

3 participants