Skip to content
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

Button Block: Allow custom width #62247

Open
bhubbard opened this issue Jun 3, 2024 · 2 comments
Open

Button Block: Allow custom width #62247

bhubbard opened this issue Jun 3, 2024 · 2 comments
Labels
[Block] Buttons Affects the Buttons Block [Type] Enhancement A suggestion for improvement.

Comments

@bhubbard
Copy link

bhubbard commented Jun 3, 2024

What problem does this address?

Currently with the button block, I can choose several popular widths, 25%, 50%, 75%, 100%. However I want to create a pattern with 3 buttons together in a row, and need to provide a more specific pattern. Example of the pattern:

Screenshot 2024-06-03 at 9 14 45 AM

What is your proposed solution?

Keep the popular widths, but have an advanced option to provide a specifics widths, px, %, rem, etc.

@bhubbard bhubbard added the [Type] Enhancement A suggestion for improvement. label Jun 3, 2024
@prasadkarmalkar
Copy link
Contributor

I would like to work on this issue, I was thinking of using the FontSizePicker for choosing the size of button, So that we can use the custom widths like px, % and rem.
In current implementation the size is added via CSS class that are by default, So to make it dynamic I was thinking of removing the default CSS classes given and use direct style attribute inside the block for custom sizes.
Here are some of the screenshots
Screenshot 2024-06-04 at 5 20 33 PM
Screenshot 2024-06-04 at 5 25 30 PM

@mirka
Copy link
Member

mirka commented Aug 7, 2024

When I look at all the blocks that had this "25%, 50%, 75%, 100%" control, they have now mostly been standardized to use the DimensionTool (see for example #52223). Can we use that here, too?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Buttons Affects the Buttons Block [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

4 participants