-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Enabling global styles to handle custom font declarations #23204
Copy link
Copy link
Closed
Labels
CSS StylingRelated to editor and front end styles, CSS-specific issues.Related to editor and front end styles, CSS-specific issues.Global StylesAnything related to the broader Global Styles efforts, including Styles Engine and theme.jsonAnything related to the broader Global Styles efforts, including Styles Engine and theme.json[Feature] ThemesQuestions or issues with incorporating or styling blocks in a theme.Questions or issues with incorporating or styling blocks in a theme.
Metadata
Metadata
Assignees
Labels
CSS StylingRelated to editor and front end styles, CSS-specific issues.Related to editor and front end styles, CSS-specific issues.Global StylesAnything related to the broader Global Styles efforts, including Styles Engine and theme.jsonAnything related to the broader Global Styles efforts, including Styles Engine and theme.json[Feature] ThemesQuestions or issues with incorporating or styling blocks in a theme.Questions or issues with incorporating or styling blocks in a theme.
Type
Fields
Give feedbackNo fields configured for issues without a type.
To use a custom font, a theme today must do the following:
@font-facedeclaration in the theme’s stylesheetAs the current global styles mechanism is described, I think the steps would be:
@font-facedeclaration in the theme’s stylesheettheme.jsonin presets and styles, something like:{ global: { presets: { fonts: [ "my font", "other font", ... ] } } }Is it possible that
theme.jsonprocesses font declarations, making at least step 2 unnecessary? I think this moves slightly beyond generating a CSS custom property.cc @carolinan