Skip to content

Neat Gradients v1.0.0

Compare
Choose a tag to compare
@9itish 9itish released this 28 Oct 02:50
· 4 commits to main since this release

What's Changed

Default animation duration

The animation duration was initially undefined if the user did not define it. It was being set to 30 seconds for the --anim-duration property inside updateAnimationDuration(). However, it wasn't set for the animDuration property on the NeatGradient object.

This update sets the value of animDuration to 30 in the constructor itself.

This was necessary because someone might write code that increase or decreases the animation duration instead of setting an explicit value. This caused issues when the value was initially undefined.

Added a Wrapper

I was applying the gradient to a div element earlier but it required some CSS rules like overflow: hidden to be applied to the parent container as well.

I felt like it isn't a good idea to change a property like this on elements I did not add. Also, asking users to apply this rule was not appealing either.

Therefore, I added a wrapper element that takes care of background positioning.

Full Changelog: https://github.com/9itish/neat-animated-gradients/commits/v1.0.0