-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Border Radius Support: Fix application of zero radius values #28998
Conversation
Thanks for the review 👍 The original PR that contained this specific fix included an arbitrary property in the theme.json schema's supports for the default. This was a hack requiring the theme developer to have to manually add that property to match whatever value they added in the theme.json styles. They would also need duplicate it per context e.g. to have different radii for The FSE gets the merged global styles added to the state. From there they can be used to set defaults on controls. Unfortunately, at this stage we do not have access to those merged styles. In the next evolution of the block supports mechanism I'm hoping that will be addressed. So to not add new properties to the schema then have to make a breaking change in dropping them, I limited the scope of this PR to only fixing the application of |
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.
Look like a good solution to me based on the explanation of the reason for the approach in #28998 (comment)
I'm just testing as a learning exercise, so don't have much context on this but can verify that: ✅ I can apply a The default value in Which makes me wonder, do we need to set the default to |
Thanks @ramonjd for giving this a test.
If I understand your question correctly. In this instance the theme.json was only setting the default 50px border radius for testing so that we could visually see the application of the explicit |
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.
Looks good to me and makes sense 👍
Size Change: +13 B (0%) Total Size: 1.38 MB
ℹ️ View Unchanged
|
Description
Fixes problem where explicitly setting a border radius of zero wasn't honoured #27667 (review)
Note: This splits out the fix for zero values from exploration on setting min/max values etc in #28541
How has this been tested?
Manually.
Testing instructions
Screenshots
Types of changes
Bug fix
Checklist: