'name' attribute is now required on Font Face definitions (breaking many existing themes) #54605
Labels
[Feature] Themes
Questions or issues with incorporating or styling blocks in a theme.
[Feature] Typography
Font and typography-related issues and PRs
Needs Dev Note
Requires a developer note for a major WordPress release cycle
[Type] Developer Documentation
Documentation for developers
Description
Previously the
name
attribute was not required in order for fonts to render.Now, when a theme.json is missing the 'name' attribute the font will not render as expected (it is excluded from the resources in
<style id='wp-fonts-local'
element).A theme.json file used to be able to be shaped like this:
wheras now it must be shaped like this
While many themes DO have the name attribute as expected many do not. Those themes will no longer display correctly once this change is released.
Step-by-step reproduction instructions
Install and activate a theme that includes fonts but does not include a 'name' attribute. Currently TwentyTwentyFour is in that state (though that is likely to change soon). Another option is the CTLG theme.
Screenshots, screen recording, code snippet
No response
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: