Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: font-size: [object Object] appearing in CSS when customizing typography #189

Closed
ajplopez opened this issue Aug 9, 2021 · 1 comment

Comments

@ajplopez
Copy link

ajplopez commented Aug 9, 2021

What version of @tailwindcss/typography are you using?

0.4.1

What version of Node.js are you using?

14.16.1

What browser are you using?

N/A

What operating system are you using?

macOS

Reproduction repository

https://play.tailwindcss.com/31mzz33oQ5

Describe your issue

I'm hoping the Tailwind Play I pasted above is enough to see the problem (in lieu of a GitHub repo).

Here it is again: https://play.tailwindcss.com/31mzz33oQ5

When I customize the font-size of typography, for example, changing the heading 3 size, it does set the size but it also puts in a second "font-size: [object Object]" which is invalid CSS (and gets ignored).

Screen Shot 2021-08-09 at 3 47 39 PM

@ajplopez
Copy link
Author

Someone on the Discord clarified that the fontSizes are provided as an array of [fontSize, lineHeight] so I needed to make it like fontSize: theme('fontSize.3xl[0]'), and that fixed the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant