-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Open
Labels
[Feature] Theme Style VariationsRelated to style variations provided by block themesRelated to style variations provided by block themes[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Description
Description
I changed the slug value in theme.json settings.typography:
"fontFamilies": [
{
"fontFamily": "\"Source Serif Pro\", serif",
"name": "Source Serif Pro",
"slug": "main",
"fontFace": [
{
"fontFamily": "Source Serif Pro",
"fontWeight": "200 900",
"fontStyle": "normal",
"fontStretch": "normal",
"fontDisplay": "swap",
"src": [
"file:./assets/fonts/SourceSerif4Variable-Roman.ttf.woff2"
]
}
]
}
],
The new variable --wp-preset--font-family--main is succesfully output for blocks.
Except for the body.
I did a search, nowhere in my theme code is this variable --wp-preset--font-family--source-serif-pro declared, also not in theme.json. It seems to be auto-generated from the font-family name.
However, it works fine for headings and other blocks.
So i'd say this looks like a bug!
Step-by-step reproduction instructions
- See above example (basically TT2), change the slug in theme.json to 'main'.
- Make sure that theme.json has:
styles.typography { "font-family" : "var(--wp-preset--font-family--main)"}. - Open the front-end, inspect the body and look for its font-family declaration on
body.
Screenshots, screen recording, code snippet
No response
Environment info
- WP 6.0.2
- No Gutenberg
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
No
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
[Feature] Theme Style VariationsRelated to style variations provided by block themesRelated to style variations provided by block themes[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended

