aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/components
diff options
context:
space:
mode:
authorBastien Wirtz <bastien.wirtz@gmail.com>2020-10-16 21:29:28 -0700
committerBastien Wirtz <bastien.wirtz@gmail.com>2020-10-16 21:58:37 -0700
commit67fd101a38baf3e7634c494eb286a671685a76b6 (patch)
tree848c2a49cb570191b268866dd75a899d5346a088 /src/components
parente60870140461be59347a57e5e3ad1657a6326437 (diff)
downloadhomer-67fd101a38baf3e7634c494eb286a671685a76b6.tar.gz
homer-67fd101a38baf3e7634c494eb286a671685a76b6.tar.zst
homer-67fd101a38baf3e7634c494eb286a671685a76b6.zip
Dark theme improvements
Diffstat (limited to 'src/components')
-rw-r--r--src/components/DynamicTheme.vue14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/components/DynamicTheme.vue b/src/components/DynamicTheme.vue
index 2ccb47b..fc2fd55 100644
--- a/src/components/DynamicTheme.vue
+++ b/src/components/DynamicTheme.vue
@@ -1,17 +1,15 @@
1<template> 1<template>
2 <DynamicStyle> 2 <DynamicStyle>
3 /* light / dark theme switch based on system pref if available */ body #app 3 :root, body #app.is-light {
4 {
5 {{ getVars(themes.light) }} 4 {{ getVars(themes.light) }}
6 } @media (prefers-color-scheme: light), (prefers-color-scheme: 5 } @media (prefers-color-scheme: light), (prefers-color-scheme:
7 no-preference) { body #app { 6 no-preference) { :root, body #app {
8 {{ getVars(themes.light) }} 7 {{ getVars(themes.light) }}
9 } } @media (prefers-color-scheme: dark) { body #app { } } /* light / dark 8 } } body #app.is-dark {
10 theme override base on user choice. */ body #app.is-dark {
11 {{ getVars(themes.dark) }} 9 {{ getVars(themes.dark) }}
12 } body #app.is-light { 10 } @media (prefers-color-scheme: dark) { :root, body #app {
13 {{ getVars(themes.light) }} 11 {{ getVars(themes.dark) }}
14 } 12 } }
15 </DynamicStyle> 13 </DynamicStyle>
16</template> 14</template>
17 15