Opened 45 hours ago
Last modified 17 hours ago
#63852 new enhancement
Twenty Twenty-Five: Code block does not use fallback to default monospace font
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 6.7 |
Component: | Bundled Theme | Keywords: | has-patch |
Focuses: | Cc: |
Description
In Appearance – Editor – Styles – Typography – Manage fonts I deactivated all fonts. I want my blog to be simple and don’t want to increase its size by using custom fonts. Now the site uses the default browser’s font and I’m happy with that.
Except that Code blocks are not using the browser’s default monospace font but instead are in the same font as the other text on the website. Code blocks should always fall back to use the Monospace font family.
Attachments (1)
Change History (2)
#1
@
17 hours ago
- Keywords has-patch added
- Summary changed from Code block does not use fall back to default Monospace font with TwentyTwentyFive theme to Twenty Twenty-Five: Code block does not use fallback to default monospace font
- Type changed from defect (bug) to enhancement
- Version changed from 6.8.2 to 6.7
Note: See
TracTickets for help on using
tickets.
I switched this to an enhancement because PR 141 indicated a preference for Fira Code instead of a monospace system font.
The patch worked for me in trunk and with WordPress 6.7, adding
monospace
inside thevar()
.font-family: var(--wp--preset--font-family--fira-code, monospace);