WordPress.org

Make WordPress Core

Opened 3 weeks ago

#48631 new enhancement

gutenberg block fullwidth additional option 'inherit inner width'

Reported by: felixbaumgaertner Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Editor Keywords:
Focuses: ui, accessibility Cc:
PR Number:

Description

For designing purposes it would be nice to set a block fullwidth, add a background-color/image/whatever and keep the content at default content width.

At the moment you can kinda achieve this by setting the block to fullwidth, centering the content and breaking the text manually, but this 'solution' doesn't look nice in every case and isn't responsive. I've found other workarounds too, but neither responsive ones.

I personally went with the following solution (which not might be the overall solution for this request):

  1. group all blocks that you want to be affected
  2. give the group a class (in this example '.fullwidth')
  3. add some css: .fullwidth .wp-block-group_inner-container { max-width: 1170px; margin: 0 auto; }
  4. repeat for the wanted breakpoints or use paddings

For people who cannot write CSS, adding an option like 'inherit inner width' would help them to achieve this kind of layout. Since I couldn't find a proper solution myself, I thought adding this feature request would help raising awareness about it. It looks like a tiny enhancement at first, but it really opens up many new design opportunities.

Thanks for reading my first ticket :)

Change History (0)

Note: See TracTickets for help on using tickets.