From c1996e1263df410c548432659094ea962c4e9791 Mon Sep 17 00:00:00 2001 From: Anthony Fu Date: Fri, 23 Feb 2024 04:59:26 +0100 Subject: [PATCH] fix: css vars --- src/vue/components/TokensRenderer.ts | 2 +- src/vue/style.css | 7 +++---- src/vue/types.ts | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/vue/components/TokensRenderer.ts b/src/vue/components/TokensRenderer.ts index 5752062..f0ec4e3 100644 --- a/src/vue/components/TokensRenderer.ts +++ b/src/vue/components/TokensRenderer.ts @@ -20,7 +20,7 @@ export const TokensRenderer = /* #__PURE__ */ defineComponent({ duration = 500, delayMove = 0.3, delayLeave = 0, - delayEnter = 0.8, + delayEnter = 0.7, easing = 'ease', } = props.animation || {} diff --git a/src/vue/style.css b/src/vue/style.css index e3e81a1..db16c35 100644 --- a/src/vue/style.css +++ b/src/vue/style.css @@ -16,20 +16,19 @@ } .shiki-magic-move-move { - transition-delay: calc(var(--duration) * var(--smm-delay-move)); + transition-delay: calc(var(--smm-duration) * var(--smm-delay-move)); z-index: 1; } .shiki-magic-move-enter-active { - transition-delay: calc(var(--duration) * var(--smm-delay-enter)); + transition-delay: calc(var(--smm-duration) * var(--smm-delay-enter)); z-index: 1; } .shiki-magic-move-leave-active { - transition-delay: calc(var(--duration) * var(--smm-delay-leave)); + transition-delay: calc(var(--smm-duration) * var(--smm-delay-leave)); } - .shiki-magic-move-enter-from, .shiki-magic-move-leave-to { opacity: 0; diff --git a/src/vue/types.ts b/src/vue/types.ts index f741251..6ac878b 100644 --- a/src/vue/types.ts +++ b/src/vue/types.ts @@ -20,7 +20,7 @@ export interface AnimationOptions { /** * Ratio of the duration to delay the enter animation * - * @default 0.8 + * @default 0.7 */ delayEnter?: number /**