Skip to content

Bug when combining Antd and TailwindCSS v4 #1345

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
muzammil0011 opened this issue May 7, 2025 · 1 comment
Open

Bug when combining Antd and TailwindCSS v4 #1345

muzammil0011 opened this issue May 7, 2025 · 1 comment
Labels
question Further information is requested

Comments

@muzammil0011
Copy link

What version of Tailwind CSS are you using?
v4.0.6

What build tool (or framework if it abstracts the build tool) are you using?
wxt 0.20.6, react 19.1.0, antd ^5.24.9,

What version of Node.js are you using?
v20.15.1

What browser are you using?
Chrome

What operating system are you using?
Windows

Reproduction URL

When combining TailwindCSS with AntD, the TailwindCSS intellicense stops working

Intellicense does not work:

@layer theme, base, antd, components, utilities;
@import "tailwindcss";

Intellicense works:
@import "tailwindcss";

This issue occurs in TailwindCSS v4

Whenever I define custom theme props in Tailwind CSS, they are also not working.

My wxt.config.ts

import { defineConfig } from "wxt";
import tailwindcss from "@tailwindcss/vite";
import path from "path";
// See https://wxt.dev/api/config.html
export default defineConfig({
	modules: ["@wxt-dev/module-react", "@wxt-dev/auto-icons"],
	autoIcons: {
		baseIconPath: "assets/icon.png",
	},
	vite: (configEnv: { mode: string }) => ({
		plugins: [tailwindcss()],
		resolve: {
			alias: {
				"@": path.resolve(__dirname),
			},
		},
	}),
	manifest: {
		permissions: ["storage"],
		author: {
			email: "[email protected]",
		},
	},
});

tailwind.config.ts

import { fontFamily } from "tailwindcss/defaultTheme";

/** @type {import('tailwindcss').Config} */
export default {
	darkMode: "class",
	prefix: "",
	content: ["./entrypoints/**/*.{html,ts,tsx}", "./components/**/*.{ts,tsx}"],
	theme: {
		extend: {
			fontFamily: {
				title: ["'Poppins'", ...fontFamily.sans],
			},
		},
	},
	plugins: [],
};

@philipp-spiess philipp-spiess transferred this issue from tailwindlabs/tailwindcss May 7, 2025
@thecrypticace
Copy link
Contributor

Can you provide a reproduction project? @muzammil0011 ?

@thecrypticace thecrypticace added the question Further information is requested label May 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants