Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow themes to supply the font weight used for "Bold" in theme.json #30297

Open
kjellr opened this issue Mar 26, 2021 · 1 comment
Open

Allow themes to supply the font weight used for "Bold" in theme.json #30297

kjellr opened this issue Mar 26, 2021 · 1 comment
Labels
[Feature] Themes Questions or issues with incorporating or styling blocks in a theme. Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json [Type] Enhancement A suggestion for improvement.

Comments

@kjellr
Copy link
Contributor

kjellr commented Mar 26, 2021

Themes can currently provide a font weight using theme.json:

"core/heading/h1": {
	"typography": {
		"fontWeight": 500
	}
}

We should figure out a way for the theme to specify a font weight for when the "Bold" (<strong>) setting is applied to that text as well:

Screen Shot 2021-03-26 at 11 07 07 AM

It's plausible that if a theme had lighter default text, they'd want the bold to be a 500 or 600 weight, rather than the default 700 weight. Usually this is something that's done via CSS, as you can see in this example from Twenty Twenty-One:

https://github.com/WordPress/twentytwentyone/blob/481fc1edc2f797a3e797a8c3919da9d969cd8155/assets/css/ie-editor.css#L1111-L1113

@kjellr kjellr added [Type] Enhancement A suggestion for improvement. [Feature] Themes Questions or issues with incorporating or styling blocks in a theme. Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json labels Mar 26, 2021
@Chrico
Copy link
Contributor

Chrico commented Mar 14, 2023

Relates/is duplicated by: #39685

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Themes Questions or issues with incorporating or styling blocks in a theme. Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

2 participants