From c2393d1076a09f85a81489e34cf847aade2d53fa Mon Sep 17 00:00:00 2001 From: Oluwatobiju Judah Date: Fri, 18 Feb 2022 16:44:55 +0100 Subject: [PATCH] bug: potential fix for vh mobile preload bug --- src/App.module.scss | 1 + src/animations/preloader.ts | 3 +++ src/index.scss | 4 ++++ 3 files changed, 8 insertions(+) diff --git a/src/App.module.scss b/src/App.module.scss index 25e2461..495427d 100644 --- a/src/App.module.scss +++ b/src/App.module.scss @@ -9,6 +9,7 @@ position: absolute; width: 100vw; height: 100vh; + opacity: 0; &[data-name="Gallery"] { background: #f5f5f5; diff --git a/src/animations/preloader.ts b/src/animations/preloader.ts index 3cec66c..8657628 100644 --- a/src/animations/preloader.ts +++ b/src/animations/preloader.ts @@ -32,6 +32,9 @@ const PreloaderAnimation = (elements: gsap.TweenTarget[]) => { gsap.set(".hidden-init", { visibility: "hidden", }); + gsap.set("[data-name]", { + opacity: 1, + }); preloader.kill(); }); diff --git a/src/index.scss b/src/index.scss index e45fdca..b4ed9f3 100644 --- a/src/index.scss +++ b/src/index.scss @@ -56,6 +56,10 @@ box-sizing: border-box; } +html { + background: #000; +} + html[data-scroll-direction] { overflow: hidden; position: fixed;