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

Add "Vertical" block style to buttons block #20081

Closed
strarsis opened this issue Feb 7, 2020 · 3 comments · Fixed by #27297
Closed

Add "Vertical" block style to buttons block #20081

strarsis opened this issue Feb 7, 2020 · 3 comments · Fixed by #27297
Assignees
Labels
[Block] Buttons Affects the Buttons Block [Status] In Progress Tracking issues with work in progress [Type] Enhancement A suggestion for improvement.

Comments

@strarsis
Copy link
Contributor

strarsis commented Feb 7, 2020

Is your feature request related to a problem? Please describe.
Currently the default styles of buttons blocks results in its
containing button blocks being aligned horizontally.
This can be annoying if existing, singular button blocks (from a time where Gutenberg hadn't used a wrapper buttons block when a button block is inserted) are transformed to be wrapped by a buttons block, because singular button blocks on each line would suddenly put on a single line in the containing buttons block.

It would therefore make sense to either add a "Vertical" core block style for the buttons block or style the buttons block default styles to vertically aligned button blocks right away.

Describe the solution you'd like
"Vertical" block style for buttons block -or-
Default blocks styles align its containing button blocks vertically, one on each line.

Describe alternatives you've considered
The alternative would be to add such a "vertical" buttons block style by plugin/theme or re-styling the default buttons block style by plugin/theme, or adding some inline styles. This can be a hassle for users that migrate singular button blocks to wrapped button blocks in buttons blocks.

@Ringish
Copy link
Contributor

Ringish commented Feb 10, 2020

Been looking into this. Is this expected behaviour?

Skärminspelning 2020-02-10 kl  17 03 58

@strarsis
Copy link
Contributor Author

@Ringish: This is nice. Though shouldn't this be an exclusive toggle between horizontal and vertical alignment as there must be one and only one of these two selected?
A theme could then provide block styles for buttons block for horizontal and vertical.
The alternative would be providing two core block styles for buttons block.

@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Feb 11, 2020
@nfmohit
Copy link
Member

nfmohit commented Feb 11, 2020

Hi! 👋

I just submitted a PR that tries to address this request.

Thanks! ❤️

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 [Status] In Progress Tracking issues with work in progress [Type] Enhancement A suggestion for improvement.
Projects
None yet
5 participants