-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Open
Labels
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] TypographyFont and typography-related issues and PRsFont and typography-related issues and PRs[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Description
Description
If the theme.json defines a default fontWeight, there are two problems in the Global Styles UI:
- Shown as a resettable value even though it is already the default value
- Keyword values such as
bold
,regular
etc. are not being applied to the dropdown
Perhaps the FontAppearanceControl
component is not properly mapping number values and keyword values.
Step-by-step reproduction instructions
After defining the theme.json like the one below, access the Global Styles > Typography panel.
Number Value (font-weight: 700)
Define the following theme.json:
{
"version": 3,
"settings": {
"appearanceTools": true,
"layout": {
"contentSize": "840px"
}
},
"styles": {
"typography": {
"fontWeight": "700"
}
}
}
- Expected: The reset button should be disabled when the font-weight value has already been defaulted
- Actual: The reset button is always enabled
fdc5998218550c73ca703a02c242b64d.mp4
Keyword Value (font-weight: bold)
Define the following theme.json:
{
"version": 3,
"settings": {
"appearanceTools": true,
"layout": {
"contentSize": "840px"
}
},
"styles": {
"typography": {
"fontWeight": "bold"
}
}
}
- Expected: "Bold" is selected
- Actual: "Thin" is selected

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
Please confirm which theme type you used for testing.
- Block
- Classic
- Hybrid (e.g. classic with theme.json)
- Not sure
Adi-ty, KIvanow and hbhalodia
Metadata
Metadata
Assignees
Labels
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] TypographyFont and typography-related issues and PRsFont and typography-related issues and PRs[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended