From 01c3dba7f7a64cf2d51a0e4e546d43b2a0a3a5d6 Mon Sep 17 00:00:00 2001 From: schmelczerandras Date: Thu, 19 Nov 2020 13:14:21 +0100 Subject: [PATCH] Fix text size flicker --- src/page/theme-switcher/theme-switcher.ts | 2 +- src/style/vars.scss | 2 -- src/styles.scss | 3 ++- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/page/theme-switcher/theme-switcher.ts b/src/page/theme-switcher/theme-switcher.ts index 6025717..d7d0538 100644 --- a/src/page/theme-switcher/theme-switcher.ts +++ b/src/page/theme-switcher/theme-switcher.ts @@ -24,7 +24,7 @@ export class PageThemeSwitcher extends PageElement { (this.htmlRoot as HTMLInputElement).checked = true; turnOffAnimations(); turnOnDarkMode(); - setTimeout(() => turnOnAnimations(), 0); + turnOnAnimations(); } else { turnOnLightMode(); } diff --git a/src/style/vars.scss b/src/style/vars.scss index a1402e8..26c9aae 100644 --- a/src/style/vars.scss +++ b/src/style/vars.scss @@ -9,9 +9,7 @@ --accent-color: #b7455e; --sun-color: #f7f78c; --very-light-text-color: #ffffff; -} -:root { --background: #ffffff; --normal-text-color: #31343f; --card-color: #ffffff; diff --git a/src/styles.scss b/src/styles.scss index 81140e8..f16b35b 100644 --- a/src/styles.scss +++ b/src/styles.scss @@ -6,7 +6,6 @@ html { height: 100%; - background-color: var(--background); transition: background-color linear var(--transition-time); @include on-small-screen { @@ -68,6 +67,8 @@ html { } body { + background-color: var(--background); + padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);