Skip to content

Commit 83354c5

Browse files
fix: stop using .night to control theme (freeCodeCamp#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
1 parent 580f57c commit 83354c5

File tree

2 files changed

+0
-8
lines changed

2 files changed

+0
-8
lines changed

client/src/redux/night-mode-saga.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,11 @@ import store from 'store';
55

66
const themeKey = 'fcc-theme';
77
const defaultTheme = 'default';
8-
const nightTheme = 'night';
98

109
export function setTheme(currentTheme = defaultTheme, theme) {
1110
if (currentTheme !== theme) {
1211
store.set(themeKey, theme);
1312
}
14-
const html = document.getElementById('__fcc-html');
15-
html.classList.remove(theme === nightTheme ? defaultTheme : nightTheme);
16-
html.classList.add(theme);
1713
}
1814

1915
function* updateLocalThemeSaga({ payload: { user, theme } }) {

client/src/templates/Challenges/components/help-modal.css

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,3 @@
33
font-size: 16px;
44
}
55
}
6-
7-
.night .help-modal-header .close {
8-
color: #fff;
9-
}

0 commit comments

Comments
 (0)