Fix ScrollingTitle translate animation on scroll
Just missed a colon in the style variable declaration 🤦
This commit is contained in:
@@ -38,7 +38,7 @@
|
|||||||
parallax = isLarger ? map(scrollY, offsetStart, offsetEnd, 0, -toTranslate, true) : 0
|
parallax = isLarger ? map(scrollY, offsetStart, offsetEnd, 0, -toTranslate, true) : 0
|
||||||
}
|
}
|
||||||
|
|
||||||
$: classes = [
|
const classes = [
|
||||||
'scrolling-title',
|
'scrolling-title',
|
||||||
'title-huge',
|
'title-huge',
|
||||||
$$props.class
|
$$props.class
|
||||||
@@ -65,7 +65,7 @@
|
|||||||
<svelte:element this={tag}
|
<svelte:element this={tag}
|
||||||
bind:this={titleEl}
|
bind:this={titleEl}
|
||||||
class={classes} aria-label={label}
|
class={classes} aria-label={label}
|
||||||
style--parallax-x="{parallax}%"
|
style:--parallax-x="{parallax}%"
|
||||||
use:reveal={revealOptions}
|
use:reveal={revealOptions}
|
||||||
>
|
>
|
||||||
<slot />
|
<slot />
|
||||||
|
|||||||
Reference in New Issue
Block a user