Skip to content
Snippets Groups Projects
Commit 35a8c379 authored by syuilo's avatar syuilo
Browse files

fix(client): Fix theme color

parent 6ff84a10
No related branches found
No related tags found
No related merge requests found
......@@ -57,6 +57,7 @@
badge: '#31b1ce',
messageBg: ':lighten<5<@bg',
deckColumnBorder: ':lighten<10<@panel',
htmlThemeColor: '@bg',
X1: ':alpha<0<@bg',
X2: ':darken<2<@panel',
X3: 'rgba(255, 255, 255, 0.05)',
......
......@@ -57,6 +57,7 @@
badge: '#31b1ce',
messageBg: '@panel',
deckColumnBorder: ':darken<20<@panel',
htmlThemeColor: '@bg',
X1: ':alpha<0<@bg',
X2: ':darken<2<@panel',
X3: 'rgba(0, 0, 0, 0.05)',
......
......@@ -40,7 +40,7 @@ html
if (theme) {
for (const [k, v] of Object.entries(JSON.parse(theme))) {
document.documentElement.style.setProperty(`--${k}`, v.toString());
if (k === 'html') {
if (k === 'htmlThemeColor') {
for (const tag of document.head.children) {
if (tag.tagName === 'META' && tag.getAttribute('name') === 'theme-color') {
tag.setAttribute('content', v);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment