-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Support presets for border widths #72015
Copy link
Copy link
Open
Labels
[Feature] Design ToolsTools that impact the appearance of blocks both to expand the number of tools and improve the experiTools that impact the appearance of blocks both to expand the number of tools and improve the experi[Type] EnhancementA suggestion for improvement.A suggestion for improvement.
Metadata
Metadata
Assignees
Labels
[Feature] Design ToolsTools that impact the appearance of blocks both to expand the number of tools and improve the experiTools that impact the appearance of blocks both to expand the number of tools and improve the experi[Type] EnhancementA suggestion for improvement.A suggestion for improvement.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Currently, the border control only supports entering widths as arbitrary sizes: https://developer.wordpress.org/themes/global-settings-and-styles/settings/border/
This is not desirable for sites with strict branding requirements, and is much more complicated than selecting from a list of preset sizes.
Developers should be able to register a set of border width presets and disable the ability to input custom border sizes, similar to font sizes or box shadows:
{ "settings": { "border": { "width": true, "widths": [ { "name": "Small", "slug": "sm", "size": "0.0625rem" }, { "name": "Medium", "slug": "md", "size": "0.125rem" }, { "name": "Large", "slug": "lg", "size": "0.25rem" } ], "customWidth": false } } }