Next.js Discord

Discord Forum

Screens defined in TailwindCSS Config are not detected

Answered
New Guinea Freshwater Crocodile posted this in #help-forum
Open in Discord
New Guinea Freshwater CrocodileOP
- tailwind.config.js:
/** @type {import('tailwindcss').Config} */
module.exports = {
  darkMode: "class", // ← Important
  content: [
    "./app/**/*.{js,ts,jsx,tsx}",
    "./src/**/*.{js,ts,jsx,tsx}",
    "./pages/**/*.{js,ts,jsx,tsx}",
    "./components/**/*.{js,ts,jsx,tsx}",
  ],
  theme: {
    extend: {
      screens: { xl_header: "1045px" },
      boxShadow: {
        md: "0 4px 12px rgba(0, 0, 0, 0.08)", // Soft floating nav effect
      },
      fontFamily: {
        sans: ["Inter", "sans-serif"],
      },
    },
  },
  plugins: [],
};

- postcss.config.mjs:
const config = {
  plugins: {
    "@tailwindcss/postcss": {},
  },
};

export default config;

the xl_header screen is not getting detected in my tailwind css code.
- I'm not using monorepo or turbopack
- I've checked default screens like md and lg are getting detected
Answered by New Guinea Freshwater Crocodile
leaving this here so if anyone sees this post they know the answer
View full answer

19 Replies

are you using tailwind v4 by any chance?
the @tailwindcss/postcss looks like v4 utility
@Yi Lon Ma are you using tailwind v4 by any chance?
New Guinea Freshwater CrocodileOP
I think so yeah
lemme confirm rq
yea the config file is deprecated in v4
New Guinea Freshwater CrocodileOP
yep
4.1.7
@Yi Lon Ma yea the config file is deprecated in v4
New Guinea Freshwater CrocodileOP
so what do I do now
follow the docs :thumbsup:
@Yi Lon Ma follow the docs <:thumbsup:1220290695219380254>
New Guinea Freshwater CrocodileOP
do these docs tell me how to make a custom screen [innocent~1](https://cdn.discordapp.com/emojis/1359838186242838538.webp?size=48&name=innocent%7E1)
oh nvm
ty
New Guinea Freshwater CrocodileOP
leaving this here so if anyone sees this post they know the answer
Answer
@Yi Lon Ma Click to see attachment
New Guinea Freshwater CrocodileOP
yep I saw it dw
tysm
sooo should I just delete the tailwind.config.js?
most likely yea after migrating
@Yi Lon Ma most likely yea after migrating
New Guinea Freshwater CrocodileOP
ty