WordPress.org

Make WordPress Core

Opened 2 months ago

Last modified 2 months ago

#53649 new defect (bug)

Twenty Twenty-One: Footer widget CSS grid

Reported by: htmgarcia Owned by:
Milestone: Awaiting Review Priority: normal
Severity: major Version: 5.8
Component: Bundled Theme Keywords: reporter-feedback
Focuses: css Cc:

Description

WordPress 5.8 RC2

When placing a block such as slider using [Slick](https://github.com/kenwheeler/slick) in footer (may happens with other blocks), the width of the footer can be longer than the available on the theme causing to display an horizontal scrollbar and messed up the width of the 3 footer widgets columns.

Solution:
in Twenty Twenty-One theme, when the CSS Grid columns width is defined, use minmax() in combination with 1fr.

grid-template-columns: repeat(2, minmax( 0, 1fr ));
grid-template-columns: repeat(3, minmax( 0, 1fr ));

Attachments (2)

Screen Shot 2021-07-12 at 14.20.49.png (100.8 KB) - added by htmgarcia 2 months ago.
Slideshow Block inside a CSS Grid column
Screen Shot 2021-07-12 at 14.22.08.png (126.2 KB) - added by htmgarcia 2 months ago.
When using minmax() the Block takes the column's width

Download all attachments as: .zip

Change History (5)

@htmgarcia
2 months ago

Slideshow Block inside a CSS Grid column

@htmgarcia
2 months ago

When using minmax() the Block takes the column's width

#1 @SergeyBiryukov
2 months ago

  • Summary changed from Twenty twenty-One theme footer widgetCSS grid to Twenty Twenty-One: Footer widget CSS grid

This ticket was mentioned in Slack in #core by jeffpaul. View the logs.


2 months ago

#3 @desrosj
2 months ago

  • Keywords reporter-feedback added

@htmgarcia Thanks for this ticket! And welcome to Trac!

Can you provide a bit more detail? Some code that can be used to demonstrate the problem would be helpful for others to gain an understanding of what's happening. The GitHub you linked to is a JavaScript library, but there's no indication of how it's being used within WordPress.

Note: See TracTickets for help on using tickets.