BorderControl: Fix border controls rendering when only color or width is enabled#70869
BorderControl: Fix border controls rendering when only color or width is enabled#70869BugReportOnWeb wants to merge 4 commits intoWordPress:trunkfrom
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Warning: Type of PR label mismatch To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.
Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task. |
What?
Closes #56402
This PR ensures that the rendering of border color and border width controls in the
BorderControlcomponent correctly reflects their respectivesettings.border.colorandsettings.border.widthvalues.Why?
Currently, the border UI in the editor shows both the color and width controls if either
settings.border.colororsettings.border.widthis set to true intheme.json. This makes it impossible to:This behavior does not respect individual border settings and limits theme authors to control over the UI.
How?
showColorControlandshowWidthControlinBorderControlandBorderBoxControl.BorderPanellogic to pass these attributes based on the setting intheme.json.Testing Instructions
{ "settings": { "border": { "color": true, "width": false } } }{ "settings": { "border": { "color": false, "width": true } } }Screenshots or screencast