ChakraUI defaulting to fallback fonts #6386
Unanswered
X-Equals-Zero
asked this question in
Q&A
Replies: 2 comments
-
I'm having the same issue, any suggestions? |
Beta Was this translation helpful? Give feedback.
0 replies
-
In case someone else is stuck on this, I had the same issue and what worked for me was the following:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am running this inside of a NextJS application. The way I understand it is that for the ChakraUI library, you use {extendTheme} to add your own styling configuration, and when you you define your font-families, you also include a fallback font (as required according to the documentation, 'Please do not forget to add font-family fallbacks like e.g. sans-serif on both options.') . (e.g. heading: { "first choice", "fallback choice" }) This is what my theme configuration looks like:
Unfortunately it will automatically default to 'sans-serif', even though if I remove that fall-back font from the theme and just leave 'droid serif', the custom fonts work perfectly fine. How I set the font in my components:
Beta Was this translation helpful? Give feedback.
All reactions