-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Description
Is your feature request related to a problem? Please describe.
Most themes I build have a strict set of button styles, which includes a limited set of border radius options. Currently, while I can override the border radius on buttons, I can't remove the block editor panel offering the border radius slider. This can result in a confusing interface for the user who sees the slider, tries playing with it, only to find it does nothing. Same goes for the Width settings panel (alternatively, I may want other width options besides 25% increments).
Other panels like the Text Settings one (up until #19208 that is) I can at least display:none
in order to hide the Drop Cap option (which still can't be disabled).
Describe the solution you'd like
The ability to, either via add_them_support()
in PHP or some javascript API like unregisterBlockStyle
, disable the border radius panel on buttons (or otherwise everywhere).
The button block should be modified so that the Border Radius and Width panels are conditional based on block support, similar to the paragraph block's typography and color settings, which can be fully disabled via supporst/block_editor_settins.
Describe alternatives you've considered
Another solution would be to add a classname to the panels so it can be hidden via the admin stylesheet.