question-mark
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.

Heading size does not work

See original GitHub issue

So i got heading with that code

<Heading as="h2" size="xs">{title}</Heading>

When i change size prop nothing happened

In devtools I see that when focusing on my heading

.css-1fgomf8 {
    font-size: sm;
    line-height: shorter;
    font-weight: bold;
    font-family: heading;
}

in font-size I got sm string. Not only is this a non-working option, but it also substitutes even the wrong string

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
segunadebayocommented, Jun 9, 2020

Thanks for chiming in @with-heart. @osadasami, you need to double-check that:

  1. You have the ThemeProvider at the root of your app.
  2. If you modified the theme, check that you have fontSizes.sm set.

I believe it should all work correctly if you try those. Let us know if it’s still an issue and we’ll revisit this.

Thank you.

1reaction
osadasamicommented, Jun 11, 2020

I got it work with gatsbyjs. Just need to import ThemeProvider in components/layout.js and wrap all the content

// components/layout.js
import { ThemeProvider } from "@chakra-ui/core"

const Layout = ({ children }) => {
  return (
    <ThemeProvider>
      <Header siteTitle={data.site.siteMetadata.title} />

      <div>
        <main>{children}</main>
      </div>
    </ThemeProvider>
  )
}

And all theme variables work great. Thank you

Read more comments on GitHub >

github_iconTop Results From Across the Web

html - Header Size Not Changing - Stack Overflow
Under the theme options in Wordpress it says that the size for Header 1 is 35px. html · css · wordpress · Share....
Read more >
Header area is too large and will not change
Header area is too large and will not change. Problem Description: I have Office Professional 2007. When I open Word the cursor is...
Read more >
3.0.1 – Headings – Global Font Size Problem - WordPress.org
When global fonts are applied, all headings inherit the “Primary” settings, including font size – even when no font size is defined for...
Read more >
Resetting Default Heading and Body Fonts in Word
Select +Body and the size text you want, then click Set as Default in the lower left-hand corner.
Read more >
Font Size Problems? Check Here First! - Codecademy
<h1 style="color:green;font-size:16px">Big Heading</h1> <p ... I find another reason for the problem of a really weird font-size reported is the chrome set ......
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 Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found