mirror of https://github.com/zulip/zulip.git
styles: Fix flatpickr dark theme in automatic mode.
Flatpickr had been unconditionally using the light theme in automatic color scheme mode; this fixes it to follow the system preference like the rest of the app. Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
parent
d3403dde86
commit
f99cff0735
|
@ -11,7 +11,7 @@ module.exports = ({file}) => ({
|
|||
// the flatpickr dark theme. We do this because flatpickr themes
|
||||
// are not scoped. See https://github.com/flatpickr/flatpickr/issues/2168.
|
||||
require("postcss-import")({
|
||||
plugins: [require("postcss-prefixwrap")("%dark-theme-block")],
|
||||
plugins: [require("postcss-prefixwrap")("%dark-theme")],
|
||||
}),
|
||||
require("postcss-nested"),
|
||||
require("postcss-extend-rule"),
|
||||
|
|
|
@ -1,11 +1,6 @@
|
|||
@import url("flatpickr/dist/themes/dark.css");
|
||||
|
||||
:root.dark-theme {
|
||||
/* the following block(s) are generated by the import statements.
|
||||
See postcss.config.js for details.
|
||||
*/
|
||||
@extend %dark-theme-block;
|
||||
|
||||
%dark-theme {
|
||||
color-scheme: dark;
|
||||
|
||||
body {
|
||||
|
@ -1502,13 +1497,17 @@
|
|||
}
|
||||
|
||||
@supports (-moz-appearance: none) {
|
||||
:root.dark-theme #settings_page select {
|
||||
%dark-theme #settings_page select {
|
||||
background-color: hsla(0, 0%, 0%, 0.2);
|
||||
}
|
||||
}
|
||||
|
||||
:root.dark-theme {
|
||||
@extend %dark-theme;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root.color-scheme-automatic {
|
||||
@extend :root.dark-theme;
|
||||
@extend %dark-theme;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue