[wp-trac] [WordPress Trac] #61140: Twenty Seventeen: Verse block font family is different in front-end (was: Twenty Seventeen Theme: verse block font family is different in front-end side.)

WordPress Trac noreply at wordpress.org
Sat May 11 17:16:45 UTC 2024


#61140: Twenty Seventeen: Verse block font family is different in front-end
---------------------------------------+------------------------------
 Reporter:  pranitdugad                |       Owner:  (none)
     Type:  defect (bug)               |      Status:  new
 Priority:  normal                     |   Milestone:  Awaiting Review
Component:  Bundled Theme              |     Version:
 Severity:  trivial                    |  Resolution:
 Keywords:  has-screenshots has-patch  |     Focuses:  css
---------------------------------------+------------------------------
Changes (by sabernhardt):

 * keywords:  has-screenshots changes-requested => has-screenshots has-patch
 * focuses:   => css


Comment:

 Matching the editor to the front end is usually the best approach, and
 removing `inherit` from editor styles probably is the best option in this
 case ([attachment:"61140.1.patch"]).

 However, it is debatable because the front end has been both ways at
 different times. The Verse block had the `pre` element's monospace font
 for the first two years, then WordPress 5.7 inherited Libre Franklin, and
 the block has been monospace again on the front since WordPress 6.2.
 -
 [https://github.com/WordPress/gutenberg/commit/f816789c5476cb36e5aafcde061540e389aec180
 Gutenberg added a Verse block] that inherited the `font-family` unless
 themes would set it to something else.
 - With WordPress 5.0, Twenty Seventeen 1.8 did not inherit the font. The
 `.editor-styles-wrapper pre` selector from `editor-styles.css` overrode
 block styles in the editor, and the theme had no front-end Verse block
 style.
 - GB27332 added `style.scss` for the block while removing styles from the
 editor, so the front end changed with Twenty Seventeen.
 - [50358] added editor styles to seven default themes to match the front-
 end style.
 - GB46560 reduced specificity to honor `theme.json` styles, which returned
 Twenty Seventeen's Verse block to monospace.

 I have added `font-size: inherit` to a client's site based on Twenty
 //Sixteen//, so that is **my** preference. For everyone else, though,
 consistently using monospace is likely the more appropriate choice because
 it was first, last, and for a longer amount of time overall. Note: the
 other themes probably would need a similar update too.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/61140#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list