#@next/font with Tailwind without wrapper
7 messages · Page 1 of 1 (latest)
There are shared layouts even in /pages. Have a look at _app.tsx
I'm using _app, was wondering if there was a way to apply the font without wrapping my application in another element to apply it.
Sure, add a global CSS
You can use stylesheets and tailwind together.
The issue is that I don't know what to put in that stylesheet. @next/font's font name is dynamically generated, so it's not as simple as just telling it to use "Inter."
The recommended approach to use Tailwind with @next/font is with a variable, but I can't figure out how to set that variable without a wrapper element. https://nextjs.org/docs/basic-features/font-optimization#with-tailwind-css