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

fix: creating keyframes inside defineVars #315

Merged

Conversation

nedjulius
Copy link
Contributor

What changed / motivation ?

This PR fixes the bug, where consumers cannot create keyframes directly inside defineVars.

export const vars = stylex.defineVars({
  fadeIn: stylex.keyframes({
    '0%': { opacity: 0 },
    '100%': { opacity: 1},
  }),
});

Linked PR/Issues

Fixes #291

Screenshots, Tests, Anything Else

Pre-flight checklist

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jan 6, 2024
Copy link
Contributor

@nmn nmn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work. Thanks!

I'm cutting a new v0.5.0 branch and hope to merge this and your other PRs into it within a couple of days.

@nedjulius
Copy link
Contributor Author

Awesome! Thanks for letting me know 👍

@nmn nmn changed the base branch from main to release/v0.5.0 January 7, 2024 13:43
@nmn nmn merged commit 80ef282 into facebook:release/v0.5.0 Jan 7, 2024
9 checks passed
nmn pushed a commit that referenced this pull request Jan 10, 2024
* Docs: Fix code example typo (#290)

* Handle `keyframe` within `defineVars`

* Add test

* Format

* Fix grammar

* Update stylex-validation-define-vars-test.js

---------

Co-authored-by: k14lb3 <76220140+k14lb3@users.noreply.github.com>
nmn pushed a commit that referenced this pull request Jan 25, 2024
* Docs: Fix code example typo (#290)

* Handle `keyframe` within `defineVars`

* Add test

* Format

* Fix grammar

* Update stylex-validation-define-vars-test.js

---------

Co-authored-by: k14lb3 <76220140+k14lb3@users.noreply.github.com>
nmn pushed a commit that referenced this pull request Jan 26, 2024
* Docs: Fix code example typo (#290)

* Handle `keyframe` within `defineVars`

* Add test

* Format

* Fix grammar

* Update stylex-validation-define-vars-test.js

---------

Co-authored-by: k14lb3 <76220140+k14lb3@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Creating stylex.keyframes directly inside stylex.defineVars causes an error
4 participants