-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 dev warning about keyframes being interpolated into plain strings. #1553
Conversation
🦋 Changeset is good to goLatest commit: 8c8e266 We got this. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codecov Report
|
I think I'd rather have a dev warning about this because running this on all string styles. It's fine when it's only for the values of a couple properties on object styles but for every string style, I'd rather avoid it in production. |
453ac6b
to
4c15290
Compare
@mitchellhamilton adjusted |
4c15290
to
6528d67
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!!
6528d67
to
8c8e266
Compare
Arguably the preferred way to write this would be to wrap the thing in
css
call which can handle interpolatedkeyframes
without falling back into regexp extraction.It's slightly weird to me though that this is allowed when using object styles but it is not when using plain strings. I can think of an argument for this (object values being shorter and not needing
css
wrapping beside this one thing), but this looks inconsistent as part of the API. So if we decide not to merge this because of performance reasons we should at least add a dev warning about this.EDIT:// changed the PR to introduce a dev warning instead of regexp matching all strings