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:
Oliver Eyton-Williams
2021-10-06 12:30:15 +02:00
committed by GitHub
parent 580f57cf5f
commit 83354c5632
2 changed files with 0 additions and 8 deletions

View File

@ -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 } }) {

View File

@ -3,7 +3,3 @@
font-size: 16px;
}
}
.night .help-modal-header .close {
color: #fff;
}