-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Description
Is your feature request related to a problem? Please describe.
I'd like a way to customize the width of the Button block; for example, a way to set the button to 100% the width of its parent container. PR #25999 adds the selector directly to the block, but this could be a good opportunity to create a block support that can be leveraged by other blocks.
Describe the solution you'd like
My suggestion is to add a new block support for dimensions settings that can be extended to include height options as well as width.
PR #26045 was an initial pass at implementing this, based on a simpified version of the Search block's settings support. It provides four default width presets at 25%, 50%, 75%, and 100% and uses CSS variables to allow themes to configure their own alternative width options.
This can be iterated on to include px or custom percentage support similar to the Search block's width selector:
Describe alternatives you've considered
An alternative suggestion for the block support's UI from feedback on #26045 is to more closely mirror the width selection from the Columns block, which has an input for custom width as a percentage and does not have any presets.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status