Skip to content

Commit

Permalink
fix: css vars
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Feb 23, 2024
1 parent 1d20c0e commit c1996e1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/vue/components/TokensRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 || {}

Expand Down
7 changes: 3 additions & 4 deletions src/vue/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/vue/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export interface AnimationOptions {
/**
* Ratio of the duration to delay the enter animation
*
* @default 0.8
* @default 0.7
*/
delayEnter?: number
/**
Expand Down

0 comments on commit c1996e1

Please sign in to comment.