Skip to content

Commit

Permalink
Replace theme CSS instead of appending it to DOM. (#21709)
Browse files Browse the repository at this point in the history
  • Loading branch information
cjcenizal authored Sep 10, 2018
1 parent 6d68215 commit 3ecf66d
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/ui/public/theme/theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,7 @@ export function applyTheme(newTheme) {

if (styleNode) {
const css = themes[currentTheme];

if (styleNode.styleSheet) {
styleNode.styleSheet.cssText = css;
} else {
styleNode.appendChild(document.createTextNode(css));
}
styleNode.textContent = css;
}
}

Expand Down

0 comments on commit 3ecf66d

Please sign in to comment.