Custom boxShadow not working when extend the theme using tailwind.config.js #14345
Replies: 3 comments 5 replies
-
|
It could be that you'd need to configure |
Beta Was this translation helpful? Give feedback.
-
|
How about adding important in there ? |
Beta Was this translation helpful? Give feedback.
-
Your class |
Beta Was this translation helpful? Give feedback.







-
What version of Tailwind CSS are you using?
^3.4.10What build tool (or framework if it abstracts the build tool) are you using?
"vite": "^5.4.1""postcss": "^8.4.41""tailwindcss": "^3.4.10"What version of Node.js are you using?
node - v20.12.2npm:10.5.2What browser are you using?
Chrome - 124.0.6367.61What operating system are you using?
Windows 10Reproduction URL
package.jsondependencies and dev dependencies{ "dependencies": { "@radix-ui/react-slot": "^1.1.0", "class-variance-authority": "^0.7.0", "clsx": "^2.1.1", "lucide-react": "^0.436.0", "react": "^18.3.1", "react-dom": "^18.3.1", "tailwind-merge": "^2.5.2", "tailwindcss-animate": "^1.0.7" }, "devDependencies": { "@eslint/js": "^9.9.0", "@types/node": "^22.5.0", "@types/react": "^18.3.3", "@types/react-dom": "^18.3.0", "@vitejs/plugin-react": "^4.3.1", "autoprefixer": "^10.4.20", "eslint": "^9.9.0", "eslint-plugin-react-hooks": "^5.1.0-rc.0", "eslint-plugin-react-refresh": "^0.4.9", "globals": "^15.9.0", "postcss": "^8.4.41", "tailwindcss": "^3.4.10", "typescript": "^5.5.3", "typescript-eslint": "^8.0.1", "vite": "^5.4.1" } }Tailwind Playground working here
Describe your issue
I am using
create vite@latestwithreact-tsand installedshadcn-uiI have tried extending the
boxShadowclass in thetailwind.config.js(refer below image)I am also getting suggestion in vscode when i hover on the class pop up with the css rule is shown (refer below image)
but when i inspect the element on webpage my custom shadow class is missing (refer below image)
When i modify the
keyintailwind.config.js(refer below image)and apply the class to my component

and inspect the component in web page (refer below image)

it is working as expected.
Beta Was this translation helpful? Give feedback.
All reactions