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 specify default font weight for headings. #22641

Closed
kjellr opened this issue May 26, 2020 · 2 comments
Closed

Allow themes to specify default font weight for headings. #22641

kjellr opened this issue May 26, 2020 · 2 comments
Labels
[Block] Heading Affects the Headings Block [Feature] Custom Editor Styles Functionality for adding custom editor styles [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

Comments

@kjellr
Copy link
Contributor

kjellr commented May 26, 2020

Currently, when using Gutenberg's default editor styles, the "Bold" option for the Header block has no effect:

Screen Shot 2020-05-26 at 2 17 05 PM

Screen Shot 2020-05-26 at 2 16 59 PM

This is because the heading is already bold by default.

A similar issue exists in Twenty Nineteen and Twenty Twenty too — they both use bold headings by default. They both have it so that when you select "Bold", the themes swap the default 700 weight for a 600 weight (effectively making the text less bold when bold is turned on).

Bold headings are a super-common pattern (it's even the browser default), so it would be excellent if Gutenberg could be smarter about this. Would it be possible to:

  • Default to "Bold" being active here, and have a class added if the text is not bold?
  • Allow themes to specify somehow what their default weight is?

The resolution to this may be just to wait for Global Styles, but I wanted to highlight this specifically, since it's come up in many themes.

@getdave
Copy link
Contributor

getdave commented Aug 12, 2021

I just hit this issue when working on the WP.org Make Blog. I assume it's fairly complex to fix?

@mtias
Copy link
Member

mtias commented May 23, 2022

This is supported through global styles UI now.

@mtias mtias closed this as completed May 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Heading Affects the Headings Block [Feature] Custom Editor Styles Functionality for adding custom editor styles [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
Projects
None yet
Development

No branches or pull requests

4 participants