Skip to content

Commit 610170f

Browse files
authored
Merge pull request #245 from objectstack-ai/copilot/fix-crm-styling-issue
2 parents cee847d + c808307 commit 610170f

4 files changed

Lines changed: 85 additions & 3 deletions

File tree

examples/crm-app/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,14 @@
2525
"tailwind-merge": "^3.4.0"
2626
},
2727
"devDependencies": {
28+
"@tailwindcss/postcss": "^4.1.18",
2829
"@types/react": "^18.3.3",
2930
"@types/react-dom": "^18.3.0",
3031
"@vitejs/plugin-react": "^4.3.1",
3132
"autoprefixer": "^10.4.19",
3233
"postcss": "^8.4.38",
3334
"tailwindcss": "^4.1.18",
35+
"tailwindcss-animate": "^1.0.7",
3436
"typescript": "^5.9.3",
3537
"vite": "^5.3.1"
3638
}

examples/crm-app/postcss.config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
export default {
2+
plugins: {
3+
'@tailwindcss/postcss': {},
4+
autoprefixer: {},
5+
},
6+
}

examples/crm-app/src/index.css

Lines changed: 71 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,53 @@
11
@import 'tailwindcss';
22

3+
/* Scan sources for Tailwind classes */
4+
@source './src/**/*.{ts,tsx}';
5+
@source '../../packages/components/src/**/*.{ts,tsx}';
6+
@source '../../packages/layout/src/**/*.{ts,tsx}';
7+
@source '../../packages/fields/src/**/*.{ts,tsx}';
8+
@source '../../packages/react/src/**/*.{ts,tsx}';
9+
@source '../../packages/plugin-dashboard/src/**/*.{ts,tsx}';
10+
11+
/* Tailwind plugin for animations */
12+
@plugin 'tailwindcss-animate';
13+
14+
/* Define theme colors for Tailwind 4 */
15+
@theme {
16+
/* Border radius tokens */
17+
--radius-lg: var(--radius);
18+
--radius-md: calc(var(--radius) - 2px);
19+
--radius-sm: calc(var(--radius) - 4px);
20+
21+
/* Color tokens mapped to CSS variables */
22+
--color-border: hsl(var(--border));
23+
--color-input: hsl(var(--input));
24+
--color-ring: hsl(var(--ring));
25+
--color-background: hsl(var(--background));
26+
--color-foreground: hsl(var(--foreground));
27+
--color-primary: hsl(var(--primary));
28+
--color-primary-foreground: hsl(var(--primary-foreground));
29+
--color-secondary: hsl(var(--secondary));
30+
--color-secondary-foreground: hsl(var(--secondary-foreground));
31+
--color-destructive: hsl(var(--destructive));
32+
--color-destructive-foreground: hsl(var(--destructive-foreground));
33+
--color-muted: hsl(var(--muted));
34+
--color-muted-foreground: hsl(var(--muted-foreground));
35+
--color-accent: hsl(var(--accent));
36+
--color-accent-foreground: hsl(var(--accent-foreground));
37+
--color-popover: hsl(var(--popover));
38+
--color-popover-foreground: hsl(var(--popover-foreground));
39+
--color-card: hsl(var(--card));
40+
--color-card-foreground: hsl(var(--card-foreground));
41+
--color-sidebar: hsl(var(--sidebar));
42+
--color-sidebar-foreground: hsl(var(--sidebar-foreground));
43+
--color-sidebar-primary: hsl(var(--sidebar-primary));
44+
--color-sidebar-primary-foreground: hsl(var(--sidebar-primary-foreground));
45+
--color-sidebar-accent: hsl(var(--sidebar-accent));
46+
--color-sidebar-accent-foreground: hsl(var(--sidebar-accent-foreground));
47+
--color-sidebar-border: hsl(var(--sidebar-border));
48+
--color-sidebar-ring: hsl(var(--sidebar-ring));
49+
}
50+
351
/* CSS custom properties for theme */
452
@layer base {
553
:root {
@@ -32,6 +80,16 @@
3280
--ring: 222.2 84% 4.9%;
3381

3482
--radius: 0.5rem;
83+
84+
/* Sidebar colors */
85+
--sidebar: 0 0% 98%;
86+
--sidebar-foreground: 240 5.3% 26.1%;
87+
--sidebar-primary: 240 5.9% 10%;
88+
--sidebar-primary-foreground: 0 0% 98%;
89+
--sidebar-accent: 240 4.8% 95.9%;
90+
--sidebar-accent-foreground: 240 5.9% 10%;
91+
--sidebar-border: 220 13% 91%;
92+
--sidebar-ring: 217.2 91.2% 59.8%;
3593
}
3694

3795
.dark {
@@ -62,15 +120,25 @@
62120
--border: 217.2 32.6% 17.5%;
63121
--input: 217.2 32.6% 17.5%;
64122
--ring: 212.7 26.8% 83.9%;
123+
124+
/* Sidebar colors for dark mode */
125+
--sidebar: 240 5.9% 10%;
126+
--sidebar-foreground: 240 4.8% 95.9%;
127+
--sidebar-primary: 224.3 76.3% 48%;
128+
--sidebar-primary-foreground: 0 0% 100%;
129+
--sidebar-accent: 240 3.7% 15.9%;
130+
--sidebar-accent-foreground: 240 4.8% 95.9%;
131+
--sidebar-border: 240 3.7% 15.9%;
132+
--sidebar-ring: 217.2 91.2% 59.8%;
65133
}
66134

67-
*[class*="border"] {
135+
* {
68136
border-color: hsl(var(--border));
69137
}
70138

71139
body {
72-
background-color: hsl(var(--background, 0 0% 100%));
73-
color: hsl(var(--foreground, 222.2 84% 4.9%));
140+
background-color: hsl(var(--background));
141+
color: hsl(var(--foreground));
74142
}
75143
}
76144

pnpm-lock.yaml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)