-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Font size in theme.json for default font sizes ignored #69581
Copy link
Copy link
Closed as not planned
Labels
[Feature] TypographyFont and typography-related issues and PRsFont and typography-related issues and PRs
Description
Description
The font sizes for default font sizes in theme.json are ignored.
Step-by-step reproduction instructions
- Define some custom font sizes in
theme.jsonfor default font sizes in test theme.
{
"settings": {
"typography": {
"customFontSize": false,
"fontSizes": [
{
"slug": "smallest",
"size": "2rem",
"name": "Smallest"
},
{
"slug": "smaller",
"size": "2rem",
"name": "Smaller"
},
{
"slug": "medium",
"size": "2rem",
"name": "Medium"
},
{
"slug": "larger",
"size": "2rem",
"name": "Larger"
},
{
"slug": "very-large",
"size": "2rem",
"name": "Very large"
},
{
"slug": "x-large",
"size": "2rem",
"name": "Huge"
}
],
"fluid": false
}
}
}- Ensure the test theme is activated.
- Load theme page, note that the default font sizes are not used from
theme.json.
Screenshots, screen recording, code snippet
--wp--preset--font-size--small: 13px;
--wp--preset--font-size--medium: 20px;
--wp--preset--font-size--large: 36px;
--wp--preset--font-size--x-large: 42px;
Environment info
- WordPress
6.7.2
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
Please confirm which theme type you used for testing.
- Block
- Classic
- Hybrid (e.g. classic with theme.json)
- Not sure
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
[Feature] TypographyFont and typography-related issues and PRsFont and typography-related issues and PRs
Type
Fields
Give feedbackNo fields configured for issues without a type.