block-options icon indicating copy to clipboard operation
block-options copied to clipboard

Add alignment (left, center, right) options to group block

Open strarsis opened this issue 5 years ago • 4 comments

The core/group block only offers wide and full alignment options, no left, center and right alignment options which many other blocks offer. This would be very useful, for example I want a group sometimes to the right, but on its own line. If I put it into a columns block, the left column would have to be emtpy. With CSS this would be trivial (e.g. margin-left: auto; margin-right: 0; for right alignment).

strarsis avatar Feb 03 '20 15:02 strarsis

@strarsis Thanks a lot for the suggestion, unfortunately this feature won't work well on Group Block until they added width control on it. Thanks again!

phpbits avatar Feb 07 '20 08:02 phpbits

@phpbits: Doesn't the group block now have width control? I can already select wide or full (or none) on a core group block in latest WordPress (and Gutenberg).

strarsis avatar Feb 07 '20 14:02 strarsis

@strarsis Yeah but it's a layout control not width control like image resizable width. Having the width will make the positioning better. I'm still checking out if there are any other possible ways but for the meantime the width is necessary. Thanks!

phpbits avatar Feb 07 '20 14:02 phpbits

@phpbits: For one theme I use the wide option for a group block to have it extend its outmost wrapper element to full width for its background, but still have its content wrapper width-constrained. Now I can easily align the content wrapper by applying CSS margin-left/margin-right auto/0, but there is no UI for this in Gutenberg editor.

strarsis avatar Feb 07 '20 15:02 strarsis