maximkoretskiy / postcss-initial

PostCSS plugin to fallback initial keyword
MIT License
187 stars 11 forks source link

Only match full word `initial` occurrences #38

Closed goto-bus-stop closed 3 years ago

goto-bus-stop commented 4 years ago

I had an animation named initiallyHide, and noticed the compiled output contained:

animation: 0s ease 0s 1 none runninglyHide 1s linear 0s 1 normal none;

So the initial in initiallyHide was replaced with running.

This patch changes the replace regex to only match on word boundaries.

Thanks!

maximkoretskiy commented 3 years ago

Thank you! Sorry for long responce