Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

add support for parenthesized values #36

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

Open
sunnyzanchi wants to merge 1 commit into codepunkt:master
base: master
Choose a base branch
Loading
from sunnyzanchi:transform

Conversation

@sunnyzanchi
Copy link

@sunnyzanchi sunnyzanchi commented Apr 26, 2022

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

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /