-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Use variation as a prop instead of variationProp in the global styles UI #47455
Conversation
Size Change: +322 B (0%) Total Size: 1.31 MB
ℹ️ View Unchanged
|
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.
Changes look good! Just one small issue needs addressing, see comment below. The repetition in manually defining the prefix for each tool seems a worthwhile tradeoff for getting rid of those regexes 😄
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.
Seems to work just fine and I like this approach much better 👍
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, all working now ✅
Extracted from #47356
What?
Replaces the variationPath prop with the variation prop in the Global Styles UI components.
Why?
The variationPath prop is very specific prop that is tied to an implementation detail (how the variation is stored in theme.json), it also randomly has to end with a dot. it's a rather specific format, we should instead just pass the variation name like we do for elements and let the components decide what to do with it.
Testing Instructions
Try testing that the global styles are still working properly for block variations .