Dark theme improvements

This commit is contained in:
Bastien Wirtz 2020-10-16 21:29:28 -07:00
parent e608701404
commit 67fd101a38
3 changed files with 12 additions and 12 deletions

View File

@ -159,7 +159,9 @@ export default {
}
this.config = merge(defaults, config);
this.services = this.config.services;
document.title = this.config.documentTitle || `${this.config.title} | ${this.config.subtitle}`;
document.title =
this.config.documentTitle ||
`${this.config.title} | ${this.config.subtitle}`;
if (this.config.stylesheet) {
let stylesheet = "";
for (const file of this.config.stylesheet) {

View File

@ -13,17 +13,17 @@
text-overflow: ellipsis;
}
html {
html, body, body #app {
height: 100%;
background-color: var(--background);
}
body {
font-family: "Raleway", sans-serif;
height: 100%;
#app {
height: auto;
min-height: 100%;
background-color: var(--background);
background-image: var(--background-image);
background-size: cover;
background-position: center;

View File

@ -1,17 +1,15 @@
<template>
<DynamicStyle>
/* light / dark theme switch based on system pref if available */ body #app
{
:root, body #app.is-light {
{{ getVars(themes.light) }}
} @media (prefers-color-scheme: light), (prefers-color-scheme:
no-preference) { body #app {
no-preference) { :root, body #app {
{{ getVars(themes.light) }}
} } @media (prefers-color-scheme: dark) { body #app { } } /* light / dark
theme override base on user choice. */ body #app.is-dark {
} } body #app.is-dark {
{{ getVars(themes.dark) }}
} body #app.is-light {
{{ getVars(themes.light) }}
}
} @media (prefers-color-scheme: dark) { :root, body #app {
{{ getVars(themes.dark) }}
} }
</DynamicStyle>
</template>