From bda3994138741625da5395419d28db08455c676a Mon Sep 17 00:00:00 2001 From: ErickSkrauch Date: Fri, 26 Mar 2021 21:09:03 +0100 Subject: [PATCH] Fix scroll direction for the SlideMotion component --- packages/app/components/ui/motion/SlideMotion.tsx | 5 ++--- packages/app/components/ui/motion/slide-motion.scss | 6 ++++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/packages/app/components/ui/motion/SlideMotion.tsx b/packages/app/components/ui/motion/SlideMotion.tsx index 8d4c202..2080385 100644 --- a/packages/app/components/ui/motion/SlideMotion.tsx +++ b/packages/app/components/ui/motion/SlideMotion.tsx @@ -77,9 +77,8 @@ class SlideMotion extends React.PureComponent {
{React.Children.map(children, (child, index) => ( diff --git a/packages/app/components/ui/motion/slide-motion.scss b/packages/app/components/ui/motion/slide-motion.scss index 147ef7d..622ee48 100644 --- a/packages/app/components/ui/motion/slide-motion.scss +++ b/packages/app/components/ui/motion/slide-motion.scss @@ -1,5 +1,11 @@ .container { white-space: nowrap; + transform: translate(var(--transition-progress)); + + html[dir='ltr'] & { + // noinspection CssInvalidFunction works fine in a browser (: + transform: translate(calc(var(--transition-progress) * -1)); + } } .item {