codepunkt/css-spring

Remove redundant values in consecutive keyframes

codepunkt opened this issue · 5 comments

When consecutive keyframes have the same value for a css property, the latter ones can be omitted.

For example, if the 90% to 95% keyframes all have left: 20px and the 96% keyframe is the first one with a different left value, the 91% to 94% keyframes can omit the left declaration alltogether.

Remark: keyframes from 91% to 94% can omit the left-property. 95% needs to keep it.
See this pen: https://codepen.io/tomm96/pen/gGXzaO

@tomm1996 you are right! thanks for pointing that out! 👍

You're welcome 👍
I'd like to give this issue a shot but the master seems kind of broken right now. Can't get it to work :(

Whats the problem? I might be able to help! ;-)

nevermind, I tried it yesterday and apparently the export in src/index.js was commented out