Make WordPress Core

Opened 4 years ago

Last modified 6 months ago

#50026 new enhancement

Twenty Twenty: Full height with short content

Reported by: beaucollins's profile beaucollins Owned by:
Milestone: Awaiting Review Priority: normal
Severity: trivial Version:
Component: Bundled Theme Keywords: has-screenshots has-patch 2nd-opinion
Focuses: css Cc:

Description (last modified by SergeyBiryukov)

With the twentytwenty theme, when the height of the content in a page does not fill up the entire viewport, the page ends up with extra trailing whitespace.

If we treat the <body> as a flex box the page will always be filled:

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;

main#site-content {
  flex: 1

Attachments (2)

height-example.png (227.6 KB) - added by beaucollins 4 years ago.
screenshot of theme with original CSS and new CSS
50026.diff (1.1 KB) - added by sabernhardt 6 months ago.

Download all attachments as: .zip

Change History (5)

4 years ago

screenshot of theme with original CSS and new CSS

#1 @beaucollins
4 years ago

call will always be filled

#2 @SergeyBiryukov
4 years ago

  • Component changed from Themes to Bundled Theme
  • Description modified (diff)
  • Summary changed from twentytwenty full height with short content to Twenty Twenty: Full height with short content

6 months ago

#3 @sabernhardt
6 months ago

  • Keywords has-patch 2nd-opinion added

As part of the proposal to retire default themes, Twenty Twenty might not have any more enhancements soon.

If this change might be worth making, I made a patch with the suggested flex styles.

Last edited 6 months ago by sabernhardt (previous) (diff)
Note: See TracTickets for help on using tickets.