Max-w-[*] not working after extracting to another file #16195
-
What version of Tailwind CSS are you using? For example: v3.4.17 What build tool (or framework if it abstracts the build tool) are you using? Next.js 15.1.6 What version of Node.js are you using? For example: v22.11.0 What browser are you using? For example: Brave What operating system are you using? Windows Link repo URL: https://github.com/NATNgoc/-Ticket-Bounty-ShadcnUI Describe your issue I decided to extract the component to another file instead of in page.tsx, but max-w-[450px] at ticketItem.tsx not working after extracting. Those mentioned files:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hey! The issue is that your component lives in diff --git a/tailwind.config.ts b/tailwind.config.ts
index b653b04..3f25474 100644
--- a/tailwind.config.ts
+++ b/tailwind.config.ts
@@ -5,6 +5,7 @@ export default {
content: [
"./src/pages/**/*.{js,ts,jsx,tsx,mdx}",
"./src/components/**/*.{js,ts,jsx,tsx,mdx}",
+ "./src/features/**/*.{js,ts,jsx,tsx,mdx}",
"./src/app/**/*.{js,ts,jsx,tsx,mdx}",
],
theme: { |
Beta Was this translation helpful? Give feedback.
Hey!
The issue is that your component lives in
src/features
, but you only told Tailwind CSS to scan forsrc/pages
,src/components
andsrc/app
. Make sure you also scan forsrc/features
: