gutenberg icon indicating copy to clipboard operation
gutenberg copied to clipboard

Allow paragraph blocks to have block "Align" options (content / wide / full width).

Open jeflopodev opened this issue 1 year ago • 0 comments

What problem does this address?

The paragraph blocks do not have Block Alignment options. They ignore the align options of their parent block and stick to the content size, unless the content size is manually overridden in the parent block to match other sizes.

https://github.com/WordPress/gutenberg/assets/679512/9e389104-306f-4167-86ac-9bdd655a8163

What is your proposed solution?

My proposed solution is to add block "Align" options to the paragraph block:

yLDQLBW 1

That would make paragraph blocks more versatile and easier to use / adapt to the layout. Without having to manually override sizes in an input in the sidebar of it's parent.

This is exactly how Heading blocks work (well, except Headings can also select the heading level).

q5l2WBl 1

And makes it more versatile, it let you adjust the block to the layout while still let you align the text within that layout:

https://github.com/WordPress/gutenberg/assets/679512/39e4b1cb-96ee-4e37-a65e-5c7e5fbe1621

This is something that you can't do with the paragraph block. And I would like the same behavior for Paragraph blocks. Not having to manually override the content size anymore.

I also want to note, that if the parent block, in this case a group block has full width align option set, the heading block is only able to adjust to content size (None) or the Wide size, but not full width.

https://github.com/WordPress/gutenberg/assets/679512/9f1a7bad-020f-4a6e-b3ee-3a5222d3d708

IMO both the paragraph and the heading blocks should be allowed to adjust to either content, wide or full width if their parent has it defined.

jeflopodev avatar May 10 '24 02:05 jeflopodev