-
-
Notifications
You must be signed in to change notification settings - Fork 99
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: add a "System" color scheme based on the user's OS light/dark mode #2281
feat: add a "System" color scheme based on the user's OS light/dark mode #2281
Conversation
It only had detected the schema change. I have put a new initial value to detect properly current OS schema. Take a look, and give me some feedback to this. |
Now when I select Dark, the UI switches to light mode and has a flash of color schema change on every refresh. Area.mp4 |
I have pushed new changes, please check and confirm. Sorry for the inconveniences. 😅 |
On Auto, there is still a flash of color schema change on every page load. Area.mp4 |
The problem here is caused when the page is rendered. Once is loaded is changed to the user preference. I'll check a possible workaround to disable this issue. |
No flashes already. I hope everything is okay now. |
From a UX perspective, I'm happy with this solution. Thanks for working through it 🙂 I only have two other points of critique:
|
The change to system has been made already. As for you saying about CSS, I agree with you. But, the only solution I see is to put light variables into :root space. But that isn't cool either.
If you have some idea about this I really appreaciate it. |
Think about how you might group color theme conditions to apply the same styles without repetition for each individual scheme. We can combine CSS selectors to target multiple specific scenarios with a single set of rules. At a minimum, each theme can be reduced to two blocks (vs the current set of three) which would resolve much of the duplication problem. |
Fixed, I was missed table styles. Sorry. |
No worries, that fixed it. Thanks! |
Hi @gboquizosanchez, Thanks for your first contribution to RAWeb. This will go out in our next site release (date TBD). |
Hi @wescopeland Thank you for the review and all the comments. I’ll be happy to assist you, guys, if you need me. |
This PR brings a new schema option based in the schema you have in your OS.
How it works
Once you select this new option and change your OS scheme. The page automatically will change.
Currently the user has to select light, dark or black as option. So, it's really annoying if your schema has been changed automatically.
For instance, if the sun fallen and your schema it's on light mode, and change, the page will keep in light mode. But with this option, it will auto detect and it will turn the page into dark mode.