WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.5k stars 4.19k forks source link

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

Open kjellr opened 3 years ago

kjellr commented 3 years ago

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

Chrico commented 1 year ago

Relates/is duplicated by: #39685