WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.52k stars 4.21k forks source link

Add Left, Right, and Full Width Alignment Options to Code Block #66960

Open dhruvikpatel18 opened 2 days ago

dhruvikpatel18 commented 2 days ago

What problem does this address?

The Code Block block currently only offers alignment options for None and Wide, limiting flexibility for users who want more control over the block’s placement in their content. This makes it harder to align the block to the left, right, or full width, similar to other default WordPress blocks.

What is your proposed solution?

Add additional alignment options (Left, Right, Full Width) to the Code Block block to provide more flexibility in layout customization, ensuring consistency with other default WordPress blocks and improving the overall user experience.

Image

Mamaduka commented 2 days ago

I'm unsure how useful these settings will be for the Code block.

@richtabor, any thoughts since you introduced support for the "Wide" alignment (#50710)?

Kallyan01 commented 1 day ago

One can easily use layout blocks to do such adjustments if needed , adding separate alignments for code block seems not useful enough !