Allow responsive font sizes in theme.
See original GitHub issueWithout predefining a component which feeds an object of font sizes into the fontSize
prop there doesn’t seem to be a way to quickly and consistently apply responsive font sizes.
It would be very handy to be able to do this:
//theme.js
const fontSizes = {
...
...
...
...
"6xl": { base: "42px", md: "54px", lg: "64px" },
}
Or perhaps add a new theme object entirely
//theme.js
const fontSizes = {
...
...
...
...
"6xl": "64px" ,
}
const fluidFontSizes = {
...
...
...
...
"6xl": { base: "42px", md: "54px", lg: "64px" },
}
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
The Beginner's Guide to Responsive Text on the Web
Learn two easy ways to create page text that sizes appropriately based on the user's device, desktop or mobile.
Read more >Responsive font size in CSS - Stack Overflow
first one is the minimum allowed font-size. ... can be used but you have to use minimum 3 media-queries to make the font...
Read more >Responsive Font Sizes In Your WordPress Website (The ...
In this article, I will go through everything you need to know to understand responsive font sizes by breaking down how the Astra...
Read more >Typography - Material UI - MUI
To automate this setup, you can use the responsiveFontSizes() helper to make Typography font sizes in the theme responsive.
Read more >How To Create a Responsive Text - W3Schools
Responsive Font Size. The text size can be set with a vw unit, which means the "viewport width". That way the text size...
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
Oh thanks so much - thats exactly what I needed! inner-critic attack alleviated.
See this codesandbox for reference: https://codesandbox.io/s/chakra-ui-responsive-heading-4bh4p?file=/src/App.tsx
<Heading size="xl"
is not the same as<Heading fontSize="xl"
. ThefontSize
prop only applies the fontSize, thesize
prop applies the defined styles from the theme.