From 51bbeb379c515527164a1b3651965ca474935301 Mon Sep 17 00:00:00 2001 From: Alexander Zinchuk Date: Tue, 13 Jul 2021 17:31:42 +0300 Subject: [PATCH] [Perf] Try alternative animation for Android --- src/components/main/Main.scss | 46 +++++++++++++++++++++++++++++++++++ src/styles/_variables.scss | 1 + 2 files changed, 47 insertions(+) diff --git a/src/components/main/Main.scss b/src/components/main/Main.scss index 05bc8430..b4816ca1 100644 --- a/src/components/main/Main.scss +++ b/src/components/main/Main.scss @@ -177,3 +177,49 @@ } } } + +body.is-android.animation-level-1 { + #LeftColumn, #MiddleColumn, #RightColumn { + transition: transform var(--layer-transition), opacity var(--layer-transition); + } + + #Main:not(.middle-column-shown) { + #MiddleColumn { + display: none; + } + } + + #Main:not(.middle-column-open) { + #MiddleColumn { + transform: translate3d(10vw, 0, 0); + opacity: 0; + } + } + + #Main.middle-column-open { + #LeftColumn { + transform: translate3d(0, 0, 0); + opacity: 0; + } + } + + #Main:not(.right-column-shown) { + #RightColumn { + display: none; + } + } + + #Main:not(.right-column-open) { + #RightColumn { + transform: translate3d(10vw, 0, 0); + opacity: 0; + } + } + + #Main.right-column-open { + #MiddleColumn { + transform: translate3d(0, 0, 0); + opacity: 0; + } + } +} diff --git a/src/styles/_variables.scss b/src/styles/_variables.scss index 1f2e76ac..8380f5dc 100644 --- a/src/styles/_variables.scss +++ b/src/styles/_variables.scss @@ -212,6 +212,7 @@ $color-user-8: #faa774; body.is-android { --slide-transition: 200ms ease-in-out; + --layer-transition: 250ms ease-in-out; } --select-transition: 200ms ease-out;