fix light mode in dark system
This commit is contained in:
parent
9fbf641571
commit
77562ecd8d
|
@ -24,7 +24,7 @@ API.colorScheme.shouldIncludeStyle('darkUI').then(val => {
|
||||||
$.root.dataset.uiTheme = isDark ? 'dark' : 'light';
|
$.root.dataset.uiTheme = isDark ? 'dark' : 'light';
|
||||||
for (const sheet of document.styleSheets) {
|
for (const sheet of document.styleSheets) {
|
||||||
for (const {media: m} of sheet.cssRules) {
|
for (const {media: m} of sheet.cssRules) {
|
||||||
if (m && m[1] === 'dark' && (m[0] === 'screen') !== isDark) {
|
if (m && m[1] === 'dark' && /screen/.test(m[0]) !== isDark) {
|
||||||
m.mediaText = isDark ? 'screen,dark' : 'not all,dark';
|
m.mediaText = isDark ? 'screen,dark' : 'not all,dark';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user