expose dark
class on html
This commit is contained in:
parent
69a421744d
commit
6dc87d2a31
|
@ -1,3 +1,4 @@
|
|||
/* global $ */// dom.js
|
||||
/* global API msg */// msg.js
|
||||
'use strict';
|
||||
|
||||
|
@ -20,6 +21,7 @@ API.colorScheme.shouldIncludeStyle('darkUI').then(val => {
|
|||
}
|
||||
});
|
||||
function toggleDarkStyles() {
|
||||
$.root.dataset.uiTheme = isDark ? 'dark' : 'light';
|
||||
for (const sheet of document.styleSheets) {
|
||||
for (const {media: m} of sheet.cssRules) {
|
||||
if (m && m[1] === 'dark' && (m[0] === 'screen') !== isDark) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user