Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

theme.fonts.body is not being applied to CReset

See original GitHub issue

Describe the bug theme.fonts.body is not being applied. (I am using the latest version of chakra-ui/nuxt, 0.0.13.)

To Reproduce Steps to reproduce the behavior:

  1. Extend theme in nuxt.config.js with extendTheme
  2. Add fonts.body
  3. Build site
  4. Inspect any plain body element and see that it uses html { font-family: sans-serif } and not the theme’s value.

Expected behavior I would expect that html font-family be set to what I provide in my theme.

Additional context Setting fonts.heading does work as expected. Additionally, I noticed that useTailwindPreflight() defines html font-family twice, where I’d expect one would suffice. I don’t know how to prove that is the cause, though.

Thanks for your help.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

galaxyblurcommented, Sep 21, 2020

Sure. Per this page I would expect the following to work:

galaxyblurcommented, Sep 26, 2020

Thanks, but what does theme.fonts.body do if not this? I mean, is this really a new feature request or a bug?

Read more comments on GitHub >

github_iconTop Results From Across the Web

body font from theme not applying · Issue #539 · system-ui ...
I'm using gatsby-plugin-theme-ui (with gatsby-starter-default) and using the Styled component from theme-ui and I'm not seeing the fonts change ...
Read more >
Body fonts not being applied - Support
Hi, Ive got a problem that the body font style (Open Sans) isnt being applied to existing text. Ive created text in Open...
Read more >
Changing theme does not change font for normal style
I tried applying several themes to the document but the "normal" ... in my document - for the font, I changed it to...
Read more >
Cant change body (paragraph) font
I stumbled upon a problem with the Colormag Free theme. ... However, the theme does not respond to changing the body font (paragraph...
Read more >
Why is 'font-family' not inherited in '<button>' tags ...
Form elements don't inherit font settings, you have to set these properties manually. If you use font declaration for eg. body, body {font-family:...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found