FriendsOfFlarum / nightmode

🌙 Turn off the lights!
https://discuss.flarum.org/d/21492-friendsofflarum-night-mode
MIT License
33 stars 22 forks source link

Scrollbar displays incorrect in Auto mode #71

Closed DellZHackintosh closed 1 year ago

DellZHackintosh commented 1 year ago

https://github.com/FriendsOfFlarum/nightmode/issues/58#issue-1167865039 pointed out that wrong color-scheme can cause the incorrect appearance of scrollbar, and then the problem solved. But I think it's not a perfect solution......When the option is Automatic (based on browser or device options) and the device is in dark mode, the same problem appears. The better solution I think is set color-scheme to light dark when the Automatic (based on browser or device options) option is active.

dsevillamartin commented 1 year ago

I think the issue is the color-scheme <meta> tag not being updated, rather than the :root color-scheme.

DellZHackintosh commented 1 year ago

But it can't be solved too. Add these CSS can solve the problem temporarily:

& when (@config-dark-mode = false) {
    color-scheme: light;
}
& when (@config-dark-mode = true) {
    color-scheme: dark;
}
dsevillamartin commented 1 year ago

@DellZHackintosh Not sure what you mean? Did v1.5.3 not fix this issue?

DellZHackintosh commented 1 year ago

Ouch, I didn't notice that😅 Then no problem anymore. Thanks.