FriendsOfFlarum / nightmode

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

fix: auto applies both stylesheets instead of only the applicable one #52

Closed davwheat closed 2 years ago

davwheat commented 2 years ago

Changes proposed in this pull request:

@config-dark-mode doesn't always act as expected.

For example, the following Less would apply on light, auto light and auto dark mode, when you'd expect it to only run in light and auto light mode:

#app when (@config-dark-mode = false) {
    display: none;
}

This is because the light and dark stylesheets are applied when in auto mode instead of only the applicable stylesheet. This was introduced in 6e683ea30d5a6988f12c982bcdeb89872b9196eb.

Confirmed