WordPress.org

Make WordPress Core

Opened 3 weeks ago

Last modified 2 weeks ago

#48731 new defect (bug)

Twenty Twenty: Full width group side padding issues

Reported by: collet Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 5.3
Component: Bundled Theme Keywords: needs-patch
Focuses: css Cc:
PR Number:

Description

1) Full Width Group with no background-color have no side padding, making the content touch the edges of the screen

Currently, if a Full Width Group has no background-color set, it doesn't have side padding. Therefore the content (heading, list, images...) can touch the edges of the screen depending on the screen size.
A group with no background-color should have the same padding-left and padding-right as a group with background-color so that nested blocks look the same.

https://i.imgur.com/jsvg9WN.png

The current fixes that add padding for the paragraph and columns blocks should be removed:
https://github.com/WordPress/WordPress/blob/master/wp-content/themes/twentytwenty/style.css#L3123-L3126

.alignfull:not(.has-background) > .wp-block-group__inner-container > p:not(.has-background-color) {
    padding-left: 2rem;
    padding-right: 2rem;
}

https://github.com/WordPress/WordPress/blob/master/wp-content/themes/twentytwenty/style.css#L2993-L2996

.alignfull:not(.has-background) .wp-block-columns {
    padding-left: 2rem;
    padding-right: 2rem;
}

2) Full Width Group with background color have a side padding of 6rem instead of 4rem

Currently, if a Full Width Group has a background-color set, its side paddings are set to 6rem for screen-sizes larger than 1220px.
It should rather be set to 4rem to match the other elements side padding (site header, site footer, wide blocks are protected from the screen edges by 4rem, full width Cover block has a 4rem side spacing...)

https://i.imgur.com/84hEbxU.png

Change History (1)

#1 @ianbelanger
2 weeks ago

  • Keywords needs-patch added
Note: See TracTickets for help on using tickets.