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

Add strong and other bold-by-default elements to the theme.json elements block #57583

Open
RatzeR opened this issue Jan 5, 2024 · 1 comment
Labels
[Package] Style Engine /packages/style-engine [Type] Enhancement A suggestion for improvement.

Comments

@RatzeR
Copy link

RatzeR commented Jan 5, 2024

What problem does this address?

I attempted to alter the font weight of all my strong-tags without resorting to custom CSS. So, I took the most straightforward approach and attempted to do this within my theme.json in the styles section...

styles.elements.strong

... only to discover that this is currently not supported.

The font weight of the strong-tag is presently set by the browser's agent styles to bold (700). Since this is relatively heavy, it can pose issues for designs that primarily employ lighter fonts. These designs might require a font weight of 500 on the strong-tags to maintain an optimal appearance.

For reproduction / testing the default styles of the strong tag the Twenty Twenty-Four Theme can be used.

What is your proposed solution?

  • Make the strong tag customizable in the theme.json

Also make other tags that are bold by default customizable:

@RatzeR RatzeR added the [Type] Enhancement A suggestion for improvement. label Jan 5, 2024
@jordesign jordesign added the [Package] Style Engine /packages/style-engine label Jan 7, 2024
@carolinan
Copy link
Contributor

Related: #54680

It is strange to me that if you use the toolbar option, B to make parts of your text "Bold" it is actually strong, not b, that is inserted. Since the editor lets users use strong this way, I agree the styling should be possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Style Engine /packages/style-engine [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

3 participants