Next.js Discord

Discord Forum

Unable to apply Tailwind styles ?

Unanswered
Northeast Congo Lion posted this in #help-forum
Open in Discord
Northeast Congo LionOP
For some reason, my Tailwind classNames are not being applied for the <Header/> and the <Dashboard/> component, specifically, the background colors. Weird thing is that it still works on other places like the body and the <SideBar/> background colors. Is there something wrong with the way I place my elements, my CSS, or the project config is incorrect ? I've been staring at it for hours and still couldn't see what and where things went wrong. Much appreciate if you could give it a look, here's my sandbox: https://codesandbox.io/p/github/HelpMe-Pls/autocall-inside/master?workspaceId=f894d9bb-cbea-4c34-8b43-5fa3305bcfdb

3 Replies

Giant panda
That sandbox is inaccessible.
Guessing into the blue, have you confirmed that the content property in the Tailwind config file matches the component file paths?
Something like content: ['src/{app,components}/**/*.{ts,tsx}'], depending on your structure.