I have a parallax effect tied to a CSS class that I apply and ask TweenLite to graduate over the length of a hero (with the help of ScrollMagic.io)
TweenLite.to(".top-hero", 1, { className: "+=parallaxed" })
When the CSS is set up to go from one 2-pair value to another, everything works great:
.top-hero {
background-position: center 0px;
&.parallaxed {
background-position: center 100px;
}
}
...but I instead need to set it up as offsets from a keyword position:
.top-hero {
background-position: left 50% bottom 0px;
&.parallaxed {
background-position: left 50% bottom -100px;
}
}
...which is what breaks with the follow error:
TweenMax.js:2839 Uncaught RangeError: Maximum call stack size exceeded
at String.split (<anonymous>)
at _parsePosition (TweenMax.js:2839)
at _parsePosition (TweenMax.js:2847)
at _parsePosition (TweenMax.js:2847)
at _parsePosition (TweenMax.js:2847)
at _parsePosition (TweenMax.js:2847)
at _parsePosition (TweenMax.js:2847)
at _parsePosition (TweenMax.js:2847)
at _parsePosition (TweenMax.js:2847)
at _parsePosition (TweenMax.js:2847)
which is pointing to the "_parsePosition" function.
Any tips on getting around this?