fix: stop using .night to control theme (#43745)
.light-palette and .dark-palette should be enough, so there's no need to attach the default or night classes to the html element
This commit is contained in:
committed by
GitHub
parent
580f57cf5f
commit
83354c5632
@ -5,15 +5,11 @@ import store from 'store';
|
||||
|
||||
const themeKey = 'fcc-theme';
|
||||
const defaultTheme = 'default';
|
||||
const nightTheme = 'night';
|
||||
|
||||
export function setTheme(currentTheme = defaultTheme, theme) {
|
||||
if (currentTheme !== theme) {
|
||||
store.set(themeKey, theme);
|
||||
}
|
||||
const html = document.getElementById('__fcc-html');
|
||||
html.classList.remove(theme === nightTheme ? defaultTheme : nightTheme);
|
||||
html.classList.add(theme);
|
||||
}
|
||||
|
||||
function* updateLocalThemeSaga({ payload: { user, theme } }) {
|
||||
|
@ -3,7 +3,3 @@
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
.night .help-modal-header .close {
|
||||
color: #fff;
|
||||
}
|
||||
|
Reference in New Issue
Block a user