How to manage line-height per font-size?
See original GitHub issueI have not found a means to manage line-height
per font-size
to achieve a vertical rhyhtm. Have I overlooked something?
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (1 by maintainers)
Top Results From Across the Web
line-height - CSS: Cascading Style Sheets - MDN Web Docs
The line-height CSS property sets the height of a line box. It's commonly used to set the distance between lines of text.
Read more >How to Tame Line Height in CSS
Getting CSS to treat line-height like leading · $lineHeightScale · $fontSize · $lineHeight · $typeOffset · $topSpace · $heightCorrection · $topSpace · $ ......
Read more >The ideal line length & line height in web design - Pimp my Type
For reading text, the ideal line is said to be around 60 to 80 characters long. Please know, this is not backed by...
Read more >Choosing a suitable line height – Fonts Knowledge
Setting a line height of 150% in a design application multiplies our font size by 1.5. The exact value we should use for...
Read more >How CSS line-height works and best practices
Setting it to any pixel value will set it to exactly this value. So if your font-size for example is 16px and you...
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
@smarchetti that’s exactly how I was doing it. The problem is, though, that you have to remember which component you’ve extended, and which one you use as-is; and import them correctly. Thus it’d be really nice if Rebass provided something to manage
line-height
internally.@jxnblk have you seen Kyle Mathews’ Typography.js? Having a global typography config for Rebass would be nice!
Another idea is to use styled-system’s
responsiveStyle
method and mapping the theme lineHeights array to thefontSize
property.