Skip to content

Commit 1e5902d

Browse files
committed
fix timing on loop presets
1 parent 5e1cf5c commit 1e5902d

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "tailwindcss-motion",
3-
"version": "0.3.0-beta",
3+
"version": "0.4.1-beta",
44
"description": "Tailwind Motion is a Tailwind CSS Plugin made by Rombo. It’s a simple, yet powerful, animation library for Tailwind CSS.",
55
"keywords": [
66
"tailwindcss",

src/presets.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@ export function addPresets(addComponents, matchComponents, theme) {
526526
return {
527527
"--motion-loop-scale-x": sizes[size],
528528
"--motion-loop-scale-y": sizes[size],
529-
"--motion-ease": "cubic-bezier(0.4, 0, 0.2, 1)",
529+
"--motion-timing": "cubic-bezier(0.4, 0, 0.2, 1)",
530530
"--motion-scale-loop-animation": scaleLoopAnimation("mirror"),
531531
animation: "var(--motion-all-loop-and-enter-animations)",
532532
};
@@ -539,7 +539,7 @@ export function addPresets(addComponents, matchComponents, theme) {
539539
};
540540
return {
541541
"--motion-loop-translate-x": sizes[size],
542-
"--motion-ease": "cubic-bezier(0.4, 0, 0.2, 1)",
542+
"--motion-timing": "cubic-bezier(0.4, 0, 0.2, 1)",
543543
"--motion-translate-loop-animation": translateLoopAnimation("mirror"),
544544
animation: "var(--motion-all-loop-and-enter-animations)",
545545
};
@@ -553,8 +553,8 @@ export function addPresets(addComponents, matchComponents, theme) {
553553
return {
554554
"--motion-loop-rotate": sizes[size],
555555
"--motion-rotate-loop-animation": rotateLoopAnimation("mirror"),
556-
"--motion-timing": "var(--motion-spring-bounciest)",
557-
"--motion-perceptual-duration-multiplier":
556+
"--motion-rotate-timing": "var(--motion-spring-bounciest)",
557+
"--motion-rotate-perceptual-duration-multiplier":
558558
springPerceptualMultipliers["var(--motion-spring-bounciest)"],
559559
animation: "var(--motion-all-loop-and-enter-animations)",
560560
};
@@ -567,7 +567,7 @@ export function addPresets(addComponents, matchComponents, theme) {
567567
};
568568
return {
569569
"--motion-loop-translate-y": sizes[size],
570-
"--motion-ease": "cubic-bezier(0.4, 0, 0.2, 1)",
570+
"--motion-timing": "cubic-bezier(0.4, 0, 0.2, 1)",
571571
"--motion-translate-loop-animation": translateLoopAnimation("mirror"),
572572
animation: "var(--motion-all-loop-and-enter-animations)",
573573
};
@@ -586,8 +586,8 @@ export function addPresets(addComponents, matchComponents, theme) {
586586
return {
587587
"--motion-loop-scale-x": xSizes[size],
588588
"--motion-loop-scale-y": ySizes[size],
589-
"--motion-ease": "var(--motion-spring-bouncier)",
590-
"--motion-perceptual-duration-multiplier":
589+
"--motion-scale-timing": "var(--motion-spring-bouncier)",
590+
"--motion-scale-perceptual-duration-multiplier":
591591
springPerceptualMultipliers["var(--motion-spring-bouncier)"],
592592
"--motion-scale-loop-animation": scaleLoopAnimation("mirror"),
593593
animation: "var(--motion-all-loop-and-enter-animations)",
@@ -601,8 +601,8 @@ export function addPresets(addComponents, matchComponents, theme) {
601601
};
602602
return {
603603
"--motion-loop-translate-y": sizes[size],
604-
"--motion-ease": "var(--motion-spring-bouncier)",
605-
"--motion-perceptual-duration-multiplier":
604+
"--motion-translate-timing": "var(--motion-spring-bouncier)",
605+
"--motion-translate-perceptual-duration-multiplier":
606606
springPerceptualMultipliers["var(--motion-spring-bouncier)"],
607607
"--motion-duration": "2000ms",
608608
"--motion-translate-loop-animation": translateLoopAnimation("mirror"),

web/src/pages/index.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<div
88
class="relative text-white text-6xl flex text-center font-black justify-center items-center h-screen flex-col bg-black"
99
>
10-
<div class="motion-translate-x-loop-[5%] motion-duration-75">🚀</div>
10+
<div class="motion-preset-float">🚀</div>
1111
</div>
1212
</body>
1313
</html>

0 commit comments

Comments
 (0)