Next.js Discord

Discord Forum

Global.css not working

Unanswered
Siberian posted this in #help-forum
Open in Discord
SiberianOP
Hi, I am using NextJS 14 with the app router. I have a global.css file inside my app folder which is imported in my rootlayout as so:
...
import "./globals.css";
...

const inter = Inter({ subsets: ["latin"] });

export default function RootLayout({
  children,
}: Readonly<{
  children: React.ReactNode;
}>) {
  return (
    <html lang="en">
      <body className={inter.className}>
        <Providers>
          <Header />
          {children}
          <Footer />
        </Providers>
      </body>
    </html>
  );
}

And inside my global.css file I have styling for the body as so:
@tailwind base;
@tailwind components;
@tailwind utilities;

body {
  color: rgb(var(--foreground-rgb));
  background-color: black;
}

@layer utilities {
  .text-balance {
    text-wrap: balance;
  }
}

But my body is not affected by the styling and I really don't know why.

4 Replies