-
Notifications
You must be signed in to change notification settings - Fork 518
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
Opt-in dark mode support 🌙 #209
Conversation
The solution to strip dark classes is pretty smart. Nice PR. |
Pretty cool! |
So how do I implement said dark mode? I just tried it out with the regular laravel breeze with blade... |
* Add opt-in dark mode support * Formatting
Can we toggle in run time? or only can choose once at installation? |
The dark mode provided by this PR can only be enabled upon installation because the CSS classes are part of the components that are published into your application's You could manually copy over the new components from the |
Thanks for the information and guide! |
thanks for this. I installed fresh Laravel 10 breeze with dark opt-in -- out of the box I dont see frontend user toggle switch - am i missing something here? |
By default Breeze uses the See the Tailwind dark mode docs for how you can implement the |
Of course.. silly of me.. Thanks for your reply |
@jessarcher is there a way to undo dark mode once installed in a laravel project, |
@andrew21-mch |
Oh, thanks alot, i had to reinstall breeze without dark theme |
thanks !! ❤️ |
This PR introduces opt-in dark mode support to Breeze 😎
This has been requested quite often, but the issue has always been that it forces developers to continue adding dark classes to everything they build. Otherwise they'll end up with partial dark mode, with dark text on a dark background. This PR solves this by making dark mode opt-in on installation with the
--dark
flag:Rather than maintaining two sets of stubs, the dark mode classes have been added to the existing stubs and the installer just strips them out unless dark mode is enabled.
Screenshots
Minor improvements that impact light-mode
I've improved the focus states for the form components as some had no visible indication when focused. I've used examples from Tailwind rather than re-inventing the wheel.
Example
I've also added focus states to the links such as "Forgot password" because the default browser focus states were ugly and inconsistent.
If this PR is not accepted, I'm happy to resubmit just those fixes.
Notes