chore: fix shadcn/ui not applying styling

https://stackoverflow.com/a/79431749

rebase
This commit is contained in:
afiqzudinhadi 2025-06-06 00:18:06 +08:00
parent 64feeaa877
commit 460b092a6f
6 changed files with 810 additions and 465 deletions

View file

@ -1,6 +1,5 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
@import "tailwindcss";
@config "../../tailwind.config.ts";
@layer base {
:root {
@ -66,3 +65,25 @@
@apply bg-background text-foreground;
}
}
html {
scroll-behavior: smooth;
}
/* Custom scrollbar */
::-webkit-scrollbar {
width: 8px;
}
::-webkit-scrollbar-track {
background: hsl(var(--muted));
}
::-webkit-scrollbar-thumb {
background: hsl(var(--border));
border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
background: hsl(var(--muted-foreground));
}

View file

@ -11,11 +11,11 @@
"prefix": ""
},
"aliases": {
"components": "~/components",
"utils": "~/lib/utils",
"ui": "~/components/ui",
"lib": "~/lib",
"hooks": "~/hooks"
"components": "@/components",
"utils": "@/lib/utils",
"ui": "@/components/ui",
"lib": "@/lib",
"hooks": "@/hooks"
},
"iconLibrary": "lucide"
}

1221
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -42,10 +42,12 @@
},
"devDependencies": {
"@remix-run/dev": "^2.16.8",
"@tailwindcss/postcss": "^4.1.8",
"@types/react": "^19.1.6",
"@types/react-dom": "^19.1.6",
"autoprefixer": "^10.4.21",
"eslint": "^9.28.0",
"tailwindcss": "^3.4.17",
"tailwindcss": "^4.1.8",
"typescript": "^5.8.3",
"vite": "^6.3.5",
"vite-tsconfig-paths": "^5.1.4"

6
postcss.config.ts Normal file
View file

@ -0,0 +1,6 @@
export default {
plugins: {
"@tailwindcss/postcss": require("@tailwindcss/postcss"),
autoprefixer: require("autoprefixer"),
},
};

View file

@ -1,8 +1,11 @@
import type { Config } from "tailwindcss";
export default {
darkMode: ["class"],
content: ["./app/**/{**,.client,.server}/**/*.{js,jsx,ts,tsx}"],
darkMode: "class",
content: [
"./app/**/{**,.client,.server}/**/*.{js,jsx,ts,tsx}",
"./app/**/*.{js,jsx,ts,tsx}",
],
theme: {
extend: {
borderRadius: {