How do I add custom tailwind designs?
Unanswered
Pomeranian posted this in #help-forum
PomeranianOP
Since the tailwind config is gone in the latest version of nextjs, where do i put and add custom tailwind gradient design for my project?
8 Replies
@joulev globals.css
ref: https://tailwindcss.com/blog/tailwindcss-v4#css-first-configuration
PomeranianOP
I forgot to mention, does globals.css acts like an external css file? But for tailwind?
@Pomeranian I forgot to mention, does globals.css acts like an external css file? But for tailwind?
not sure what you mean by 'external', but tailwind in v4 moves the entire config from a config.js file to the css file
globals.css
is just the name. Doesn't matter what name you give it. By convention "globals" is the name Next.js gives to it, and it's the endtypoint to load Tailwind styles@LuisLl `globals.css` is just the name. Doesn't matter what name you give it. By convention "globals" is the name Next.js gives to it, and it's the endtypoint to load Tailwind styles
PomeranianOP
What does it do? Im still new to next js so i dont really dont know that much
globals.css
is just a CSS file, and that file is being imported into your root layout, that’s why it acts as your entry point to load Tailwind styles. You can leave it as it is and use the name next.js provides as the default (globals.css) or change it, or even create a new CSS file where you import tailwind and use that as the entry point, then you’ll have to import that file instead your root layout in order to have Tailwind configured correctly
@Pomeranian What does it do? Im still new to next js so i dont really dont know that much
Polar bear
any style into global.css is applyied to any of your routes