diff --git a/apps/builder/app/builder/features/settings-panel/props-section/animation/new-scroll-animations.ts b/apps/builder/app/builder/features/settings-panel/props-section/animation/new-scroll-animations.ts index 33aaa3a20157..f515f0a095b9 100644 --- a/apps/builder/app/builder/features/settings-panel/props-section/animation/new-scroll-animations.ts +++ b/apps/builder/app/builder/features/settings-panel/props-section/animation/new-scroll-animations.ts @@ -25,8 +25,8 @@ const newFadeInScrollAnimation: ScrollAnimation = { description: "Fade in the element as it scrolls into view.", timing: { - rangeStart: ["start", { type: "unit", value: 0, unit: "%" }], - rangeEnd: ["start", { type: "unit", value: 50, unit: "dvh" }], + rangeStart: ["start", { type: "unit", value: 0, unit: "px" }], + rangeEnd: ["start", { type: "unit", value: 50, unit: "px" }], fill: "backwards", easing: "linear", }, @@ -45,8 +45,8 @@ const newFadeOutScrollAnimation: ScrollAnimation = { description: "Fade out the element as it scrolls out of view.", timing: { - rangeStart: ["end", { type: "unit", value: 50, unit: "dvh" }], - rangeEnd: ["end", { type: "unit", value: 0, unit: "%" }], + rangeStart: ["end", { type: "unit", value: 50, unit: "px" }], + rangeEnd: ["end", { type: "unit", value: 0, unit: "px" }], fill: "backwards", easing: "linear", }, diff --git a/packages/sdk/src/schema/animation-schema.ts b/packages/sdk/src/schema/animation-schema.ts index 82d1c0036818..27374cfd7f45 100644 --- a/packages/sdk/src/schema/animation-schema.ts +++ b/packages/sdk/src/schema/animation-schema.ts @@ -12,50 +12,7 @@ const literalUnion = (arr: T) => ); // Range Units -export const RANGE_UNITS = [ - "%", - "px", - "cm", - "mm", - "q", - "in", - "pt", - "pc", - "em", - "rem", - "ex", - "rex", - "cap", - "rcap", - "ch", - "rch", - "lh", - "rlh", - "vw", - "svw", - "lvw", - "dvw", - "vh", - "svh", - "lvh", - "dvh", - "vi", - "svi", - "lvi", - "dvi", - "vb", - "svb", - "lvb", - "dvb", - "vmin", - "svmin", - "lvmin", - "dvmin", - "vmax", - "svmax", - "lvmax", - "dvmax", -] as const; +export const RANGE_UNITS = ["%", "px"] as const; export const rangeUnitSchema = literalUnion(RANGE_UNITS);