add fontWeight to theme
See original GitHub issueFollow up issue from #311
@broccolini how does this look for structure? Are there any other font weights we want to include?
fontWeight: {
bold: '600',
normal: '400'
}
- Update any instances where fontWeight is hard coded
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Theme.json typography: Line height, font weight and text ...
In this lesson I bring up the theme.json font style settings as well as line height, font weight and text decoration settings.
Read more >font-weight - CSS: Cascading Style Sheets - MDN Web Docs
The font-weight CSS property sets the weight (or boldness) of the font. The weights available depend on the font-family that is currently ...
Read more >How to add custom font weights to Material UI? - Stack Overflow
Trying to configure Material theme to use my own font and custom font weights/sizes for the Typography components. For the fontWeight ...
Read more >Typography - MUI System
Documentation and examples for common text utilities to control alignment, wrapping, weight, and more.
Read more >Font Weight - Tailwind CSS
By default, Tailwind provides nine font-weight utilities. You change, add, or remove these by editing the theme.fontWeight section of your Tailwind config.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I talked with @emplums about this yesterday, I’m not sure we should support
semibold
in the theme because this should not be used. A few years ago when we introduced system fonts, we reduced the amount of font variations significantly, and made bold lighter and removed semibold instances. I think there are still some instances of semibold but it’s not a weight we should promote.I agree that we should let people use number values too so they could still override, but with props I’d prefer to only have strings for the ones we want to promote.
Related, we only support
font-weight: 300
for font sizes 20px and above because light weight fonts reduce readability. It would be great if we can warn folks on this type of thing if possible.@colebemis not a dumb question! They can be numbers, and I think that the values in the
fontWeights
theme key should be: