Make WordPress Core

Opened 11 months ago

Last modified 11 days ago

#58440 new defect (bug)

Twenty Nineteen: Inconsistent H1 font size

Reported by: nkeller15's profile nkeller15 Owned by:
Milestone: Future Release Priority: normal
Severity: minor Version: 5.0
Component: Bundled Theme Keywords: has-screenshots has-patch changes-requested
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 11 months ago.
editor screenshot
SCR-20230601-ltbx.png (141.0 KB) - added by nkeller15 11 months ago.
front end screenshot
58440.1.patch (780 bytes) - added by nkeller15 11 months ago.
patch

Download all attachments as: .zip

Change History (6)

@nkeller15
11 months ago

editor screenshot

@nkeller15
11 months ago

front end screenshot

@nkeller15
11 months ago

patch

#1 @sabernhardt
11 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.)

#2 @karmatosed
11 days ago

  • Keywords changes-requested added

I think it makes sense to ensure that the front looks like the editor where possible. I agree with you, @sabernhardt, that increasing the size doesn't feel the right path here. If a more passive patch, as you recommend, could be produced, I would like to explore that. Thank you, everyone.

#3 @karmatosed
11 days ago

  • Milestone changed from Awaiting Review to Future Release
Note: See TracTickets for help on using tickets.