Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for parenthesized values #36

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sunnyzanchi
Copy link

this change addresses #13. it lets spring generate keyframes for parenthesized values. it's a naive implementation — it doesn't care if there's a trailing parenthesis and can't handle multiple comma separated values, like transform: translate(30px, 30px). it also isn't smart enough to generate keyframes for start and end values like transform: scale(4) and transform: none. but it will work for multiple values, so transform: translateX(30px) translateY(30px) will work

i updated the tests with a couple new test cases and updated the snapshots to include keyframes with a transform

changes the `parseNumber` regex to optionally capture
an alphabetic value preceding a `(` and return it as `wrapper`.
as is, the regex will accept values without a trailing `)`.
`spring` later uses `wrapper` to reassemble the final value
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant