Respect "prefers-color-scheme" media selector for guests#21366
Respect "prefers-color-scheme" media selector for guests#21366nickvergessen merged 1 commit intomasterfrom
Conversation
Signed-off-by: Joas Schilling <coding@schilljs.com>
|
cc @nextcloud/accessibility |
|
cc @nextcloud/theming |
jancborchardt
left a comment
There was a problem hiding this comment.
Wow, this is pretty amazing! :) Great integration and works well when tested with the link sharing pages of Forms, Talk, and Files.
|
Where does the actual |
|
Its on the link meta tag, that is the only why you can set global css vars within a condition |
|
Does not fully fix #12276 as it is only for unauthorized access though public pages, but a good first step 👍 |
|
Yeah, we can show a not about the personal setting based on the selector in the future, but first guests only. |
|
How can I turn this off? For some reason, nextcloud switched to dark mode today after I logged in, and I really dislike it. The dashboard is unreadable and everything looks unsharp to my eyes. I need dark on white text, which is available, but not accessible to me, apparently. |
|
Update: another logout - login cycle fixed it... |
Guests now automatically see dark theme when the browser tells the website it prefers a
darkstyle:https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme
A similar setting for contrast
highseems to be in development but is not supported:https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-contrast
See https://stackoverflow.com/a/56757527 for helps how to test this quickly
Edit by @georgehrke:
fixes #12276