feat: use browser theme by default for loading background

This commit is contained in:
wanhose 2021-06-23 17:30:28 +02:00
parent 7b2c97a9d0
commit 36f9ebb8f1
2 changed files with 10 additions and 3 deletions

View File

@ -51,7 +51,8 @@ const fix = () => {
if (body) body.style.setProperty("overflow-y", "unset", "important");
if (facebook) facebook.style.setProperty("position", "unset", "important");
if (html) html.style.setProperty("overflow-y", "unset", "important");
if (!loading) html.style.setProperty("opacity", "1", "important");
if (body && !loading) body.style.setProperty("opacity", "1");
if (html && !loading) html.style.setProperty("background-color", "initial");
};
/**

View File

@ -1,3 +1,9 @@
html {
opacity: 0 !important;
body {
opacity: 0;
}
@media (prefers-color-scheme: dark) {
html {
background-color: #424242;
}
}