Next.js Discord

Discord Forum

tailwind not workign

Unanswered
Saltwater Crocodile posted this in #help-forum
Open in Discord
Saltwater CrocodileOP
why is my tailwind not setting the correct background?

11 Replies

Saltwater CrocodileOP
ive made the project with create next app so ive the config
Icelandic Sheepdog
what does you configs look like? Tailwind config, postcss config?
Saltwater CrocodileOP
this is the tailwind config
import type { Config } from 'tailwindcss'

const config: Config = {
  content: [
    './src/pages/**/*.{js,ts,jsx,tsx,mdx}',
    './src/components/**/*.{js,ts,jsx,tsx,mdx}',
    './src/app/**/*.{js,ts,jsx,tsx,mdx}',
  ],
  theme: {
    extend: {
      backgroundImage: {
        'gradient-radial': 'radial-gradient(var(--tw-gradient-stops))',
        'gradient-conic':
          'conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))',
      },
    },
  },
  plugins: [],
}
export default config
and postcss is htis
(didnt edit anything - justz the generated ones)
Icelandic Sheepdog
hmm those look ok. does your pages and components live in src? What does your app directory structure look like?
Saltwater CrocodileOP
Icelandic Sheepdog
yeah, everything in app. paths look correct. How strange
Saltwater CrocodileOP
indeed, i already ussed tailwind in some of my other projects and it worked there before
Icelandic Sheepdog
yeah... what happens if you try to use a provided default class instead of an aributary one. Like bg-gray-200 or soemthing?
Saltwater CrocodileOP
nothing - still white background