Make WordPress Core

Opened 4 months ago

Last modified 4 months ago

#58440 new defect (bug)

Twenty Nineteen: Inconsistent H1 font size

Reported by: nkeller15's profile nkeller15 Owned by:
Milestone: Awaiting Review Priority: normal
Severity: minor Version: 5.0
Component: Bundled Theme Keywords: has-screenshots has-patch
Focuses: css Cc:

Description

The H1 or .entry-title for pages is not the same between the editor and the front end for the Twenty Nineteen theme. The .entry-title class in the style.css overwriting it to be 2.25em large.

Steps to reproduce the issue:

  1. Activate Twenty Nineteen theme.
  2. Edit a page
  3. Inspect or notice page title font size in the editor (H1)
  4. Save and view front end of page and inspect/notice difference in font size of page title

Attachments (3)

SCR-20230601-lsvo.png (210.7 KB) - added by nkeller15 4 months ago.
editor screenshot
SCR-20230601-ltbx.png (141.0 KB) - added by nkeller15 4 months ago.
front end screenshot
58440.1.patch (780 bytes) - added by nkeller15 4 months ago.
patch

Download all attachments as: .zip

Change History (4)

@nkeller15
4 months ago

editor screenshot

@nkeller15
4 months ago

front end screenshot

@nkeller15
4 months ago

patch

#1 @sabernhardt
4 months ago

  • Summary changed from Twenty Nineteen - Inconsistent H1 font size to Twenty Nineteen: Inconsistent H1 font size
  • Version changed from 6.2.2 to 5.0

Headings with the entry-title class have always been smaller than the h1 element's size. I do not recommend increasing the size on the front end unexpectedly after more than four years, even if that is an improvement.

Matching the editor to the front might be as simple as adding .wp-block-post-title with the h2 editor styles:

.wp-block-post-title,
h2 {
  font-size: $font__size-lg;
  @include post-section-dash;

  @include media(tablet) {
    font-size: $font__size-xl;
  }
}

(Note: The .wp-block-post-title class would not work in older versions of WordPress, such as 5.0 and 5.3.)

Note: See TracTickets for help on using tickets.