Skip to content

Commit

Permalink
fix: set color scheme
Browse files Browse the repository at this point in the history
  • Loading branch information
dessant committed Dec 16, 2022
1 parent a31d866 commit 57c941a
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 8 deletions.
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"uuid": "^9.0.0",
"vue": "^3.2.45",
"vuetify": "^3.0.5",
"vueton": "^0.1.3",
"vueton": "^0.1.4",
"webextension-polyfill": "^0.10.0",
"wesa": "^0.3.0"
},
Expand Down
1 change: 1 addition & 0 deletions src/contribute/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="color-scheme" content="light dark" />
<meta name="referrer" content="no-referrer" />
<link
rel="icon"
Expand Down
1 change: 1 addition & 0 deletions src/options/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="color-scheme" content="light dark" />
<meta name="referrer" content="no-referrer" />
<link
rel="icon"
Expand Down
2 changes: 2 additions & 0 deletions src/utils/vuetify.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ async function configTheme(vuetify) {
theme = getDarkColorSchemeQuery().matches ? 'dark' : 'light';
}

document.documentElement.style.setProperty('color-scheme', theme);

vuetify.theme.global.name.value = theme;
}

Expand Down

0 comments on commit 57c941a

Please sign in to comment.