From 661fc22e1f649e19e4dc3498130c56d6bb1b6fab Mon Sep 17 00:00:00 2001 From: Theo-Steiner Date: Sat, 10 Apr 2021 13:13:01 +0900 Subject: [PATCH] change double quotes to single quotes, translated css vars to snake_case --- src/runtime/transition/index.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/runtime/transition/index.ts b/src/runtime/transition/index.ts index 7a9de2ad57..d5756e4741 100644 --- a/src/runtime/transition/index.ts +++ b/src/runtime/transition/index.ts @@ -98,14 +98,14 @@ export interface SlideParams { delay?: number; duration?: number; easing?: EasingFunction; - axis?: "x" | "y"; + axis?: 'x' | 'y'; } export function slide(node: Element, { delay = 0, duration = 400, easing = cubicOut, - axis = "y" + axis = 'y' }: SlideParams = {}): TransitionConfig { const style = getComputedStyle(node); const opacity = +style.opacity; @@ -129,8 +129,8 @@ export function slide(node: Element, { duration, easing, css: t => - `--yAxisT: ${axis === "y" ? t : 1};` + - `--xAxisT: ${axis === "x" ? t : 1};` + + `--y_axis_t: ${axis === 'y' ? t : 1};` + + `--x_axis_t: ${axis === 'x' ? t : 1};` + 'overflow: hidden;' + `opacity: ${Math.min(t * 20, 1) * opacity};` + `height: calc(var(--yAxisT) * ${height}px);` +