#56737 closed defect (bug) (fixed)
theme.json link styles overrides link styles in the front view of the WordPress adminbar
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 6.1 | Priority: | normal |
| Severity: | normal | Version: | 6.1 |
| Component: | Toolbar | Keywords: | has-patch commit |
| Focuses: | Cc: |
Description (last modified by )
If a theme includes a theme.json file and sets a font-style on links, the font-style also changes the links in the WordPress admin bar, when the admin bar is visible on the front of the website.
Originally reported by @audrasjb in the GitHub repository for Twenty Twenty-Three
Steps to reproduce
On your WordPress install, please make sure that the WordPress adminbar is set to display on the front of the website (User > toolbar, Show Toolbar when viewing site).
- Activate Twenty Twenty-Three
- Go to Appearance, Editor (beta)
- Open the Styles sidebar. Select the style variation called "Block Out".
- Save and view the front.
- Confirm if the admin bar has italic link texts. (This is the bug)
Alternatively, add the following to theme.json in your chosen test theme and view the front of the website:
{
"$schema": "https://schemas.wp.org/trunk/theme.json",
"version": 2,
"styles": {
"elements": {
"link": {
"typography": {
"fontStyle": "italic"
}
}
}
}
}
Attachments (3)
Change History (9)
#2
@
3 years ago
- Keywords has-patch added
The patch adds font-style:normal to the WordPress admin bar, so that the font-style is no longer inherited from the theme.json styles.
To test, apply the patch -build the minified & rtl styles, and follow the "Steps to reproduce", but confirm that the link text in the admin bar is not italic.
Add font-style: normal to the admin bar