Skip to content

Commit 137c74f

Browse files
committed
fix: convert oklch colors to hsl for gradient compatibility
The fallback CSS custom properties were using oklch() color format which has compatibility issues with CSS gradients on certain browser/OS combinations (Edge/Chrome on Windows). This caused gradient backgrounds on buttons to fail completely, rendering them as white/invisible. Converted all fallback colors in :root and .dark selectors from oklch() to hsl() format which has universal browser support. Colors now match the acp.css theme file values.
1 parent 75e5dfa commit 137c74f

File tree

1 file changed

+67
-73
lines changed

1 file changed

+67
-73
lines changed

tooling/tailwind/globals.css

Lines changed: 67 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -287,57 +287,55 @@
287287
/* Border radius */
288288
--radius: 0.625rem;
289289

290-
/* Base colors - Light mode with dark text */
290+
/* Base colors - Light mode with dark text (using hsl for gradient compatibility) */
291291
--background: transparent;
292-
--foreground: oklch(0.15 0 0); /* Near black - dark text for light mode */
292+
--foreground: hsl(0 0% 10%); /* Near black - dark text for light mode */
293293
--card: transparent;
294-
--card-foreground: oklch(0.15 0 0); /* Near black - dark text */
294+
--card-foreground: hsl(0 0% 10%); /* Near black - dark text */
295295
--popover: transparent;
296-
--popover-foreground: oklch(0.15 0 0); /* Near black - dark text */
296+
--popover-foreground: hsl(0 0% 10%); /* Near black - dark text */
297297

298-
/* Primary colors - Light mode */
299-
--primary: oklch(0.5 0.2 250); /* Blue */
300-
--primary-foreground: oklch(0.98 0 0); /* White text on primary */
298+
/* Primary colors - Light mode (purple/violet like acp.css theme) */
299+
--primary: hsl(262 83% 58%); /* Purple - matches acp.css */
300+
--primary-foreground: hsl(0 0% 100%); /* White text on primary */
301301

302302
/* Secondary colors - Light mode */
303-
--secondary: oklch(0.96 0 0); /* Very light gray */
304-
--secondary-foreground: oklch(0.15 0 0); /* Dark text */
303+
--secondary: hsl(240 5% 96%); /* Very light gray */
304+
--secondary-foreground: hsl(240 6% 10%); /* Dark text */
305305

306306
/* Muted colors - Light mode */
307-
--muted: oklch(
308-
0.85 0 0
309-
); /* Dark gray - darker shade to avoid glass effect override */
310-
--muted-foreground: oklch(0.1 0 0); /* Medium gray text */
307+
--muted: hsl(240 5% 96%); /* Light gray */
308+
--muted-foreground: hsl(240 4% 46%); /* Medium gray text */
311309

312310
/* Accent colors - Light mode */
313-
--accent: oklch(0.96 0 0); /* Very light gray */
314-
--accent-foreground: oklch(0.15 0 0); /* Dark text */
311+
--accent: hsl(262 80% 96%); /* Very light purple */
312+
--accent-foreground: hsl(262 83% 45%); /* Dark purple text */
315313

316314
/* Destructive colors - WCAG AA compliant (4.5:1 contrast) */
317-
--destructive: oklch(0.55 0.22 25); /* Red - 4.5:1 with white */
318-
--destructive-foreground: oklch(0.98 0 0); /* White text on red */
315+
--destructive: hsl(0 84% 60%); /* Red - 4.5:1 with white */
316+
--destructive-foreground: hsl(0 0% 100%); /* White text on red */
319317

320318
/* Border and input - WCAG AA compliant (3:1 for UI components) */
321-
--border: oklch(0.88 0 0); /* Light gray - 3:1 contrast */
322-
--input: oklch(0.88 0 0); /* Light gray - 3:1 contrast */
323-
--ring: oklch(0.5 0.2 250); /* Blue ring - 3:1 contrast */
319+
--border: hsl(240 6% 90%); /* Light gray - 3:1 contrast */
320+
--input: hsl(240 6% 90%); /* Light gray - 3:1 contrast */
321+
--ring: hsl(262 83% 58%); /* Purple ring - matches primary */
324322

325323
/* Chart colors - WCAG AA compliant */
326-
--chart-1: oklch(0.6 0.2 250); /* Blue */
327-
--chart-2: oklch(0.55 0.15 150); /* Green */
328-
--chart-3: oklch(0.5 0.2 50); /* Yellow */
329-
--chart-4: oklch(0.65 0.2 300); /* Purple */
330-
--chart-5: oklch(0.6 0.2 20); /* Orange */
324+
--chart-1: hsl(220 70% 50%); /* Blue */
325+
--chart-2: hsl(160 60% 45%); /* Green */
326+
--chart-3: hsl(30 80% 55%); /* Orange */
327+
--chart-4: hsl(280 65% 60%); /* Purple */
328+
--chart-5: hsl(10 75% 55%); /* Red-orange */
331329

332330
/* Sidebar colors - Light mode */
333-
--sidebar: oklch(0.98 0 0); /* Near white */
334-
--sidebar-foreground: oklch(0.15 0 0); /* Dark text */
335-
--sidebar-primary: oklch(0.5 0.2 250); /* Blue */
336-
--sidebar-primary-foreground: oklch(0.98 0 0); /* White text on primary */
337-
--sidebar-accent: oklch(0.96 0 0); /* Very light gray */
338-
--sidebar-accent-foreground: oklch(0.15 0 0); /* Dark text */
339-
--sidebar-border: oklch(0.88 0 0); /* Light gray - 3:1 contrast */
340-
--sidebar-ring: oklch(0.5 0.2 250); /* Blue ring - 3:1 contrast */
331+
--sidebar: hsl(0 0% 98%); /* Near white */
332+
--sidebar-foreground: hsl(240 10% 10%); /* Dark text */
333+
--sidebar-primary: hsl(262 83% 58%); /* Purple */
334+
--sidebar-primary-foreground: hsl(0 0% 100%); /* White text on primary */
335+
--sidebar-accent: hsl(240 5% 96%); /* Very light gray */
336+
--sidebar-accent-foreground: hsl(240 6% 10%); /* Dark text */
337+
--sidebar-border: hsl(240 6% 90%); /* Light gray - 3:1 contrast */
338+
--sidebar-ring: hsl(262 83% 58%); /* Purple ring - matches primary */
341339

342340
/* Apple-standard glassmorphism - Very subtle and refined */
343341
/* Low opacity for Apple's standard glass effect */
@@ -492,59 +490,55 @@
492490
--glass-crystal-shadow-hover:
493491
0 0 25px rgba(0, 0, 0, 0.5), 0 0 35px rgba(255, 255, 255, 0.2);
494492

495-
/* Base colors - Apple-style white text */
493+
/* Base colors - Dark mode (using hsl for gradient compatibility) */
496494
--background: transparent;
497-
--foreground: oklch(1 0 0); /* White - Apple-style */
495+
--foreground: hsl(0 0% 95%); /* Near white */
498496
--card: transparent;
499-
--card-foreground: oklch(1 0 0); /* White - Apple-style */
497+
--card-foreground: hsl(0 0% 95%); /* Near white */
500498
--popover: transparent;
501-
--popover-foreground: oklch(1 0 0); /* White - Apple-style */
499+
--popover-foreground: hsl(0 0% 95%); /* Near white */
502500

503-
/* Primary colors - Apple-style white text */
504-
--primary: oklch(0.7 0.15 250); /* Light blue */
505-
--primary-foreground: oklch(1 0 0); /* White - Apple-style */
501+
/* Primary colors - Brighter purple for dark mode */
502+
--primary: hsl(262 83% 65%); /* Brighter purple - matches acp.css dark mode */
503+
--primary-foreground: hsl(0 0% 100%); /* White */
506504

507-
/* Secondary colors - Apple-style white text */
508-
--secondary: oklch(0.25 0 0); /* Dark gray */
509-
--secondary-foreground: oklch(1 0 0); /* White - Apple-style */
505+
/* Secondary colors - Dark mode */
506+
--secondary: hsl(230 20% 18%); /* Dark gray with blue tint */
507+
--secondary-foreground: hsl(0 0% 95%); /* Near white */
510508

511-
/* Muted colors - Apple-style white text */
512-
--muted: oklch(
513-
0.18 0 0
514-
); /* Darker gray - darker shade to avoid glass effect override */
515-
--muted-foreground: oklch(1 0 0); /* White - Apple-style */
509+
/* Muted colors - Dark mode */
510+
--muted: hsl(230 15% 20%); /* Dark gray */
511+
--muted-foreground: hsl(240 5% 65%); /* Medium gray */
516512

517-
/* Accent colors - Apple-style white text */
518-
--accent: oklch(0.25 0 0); /* Dark gray */
519-
--accent-foreground: oklch(1 0 0); /* White - Apple-style */
513+
/* Accent colors - Dark mode */
514+
--accent: hsl(262 30% 20%); /* Dark purple */
515+
--accent-foreground: hsl(262 80% 75%); /* Light purple */
520516

521517
/* Destructive colors - WCAG AA compliant (4.5:1 contrast) */
522-
--destructive: oklch(
523-
0.65 0.22 25
524-
); /* Light red - 4.5:1 with dark background */
525-
--destructive-foreground: oklch(0.12 0 0); /* Near black text on red */
518+
--destructive: hsl(0 62% 50%); /* Red - matches acp.css dark mode */
519+
--destructive-foreground: hsl(0 0% 100%); /* White text on red */
526520

527521
/* Border and input - WCAG AA compliant (3:1 for UI components) */
528-
--border: oklch(0.3 0 0); /* Medium gray - 3:1 contrast */
529-
--input: oklch(0.25 0 0); /* Dark gray - 3:1 contrast */
530-
--ring: oklch(0.6 0.2 250); /* Light blue ring - 3:1 contrast */
522+
--border: hsl(230 15% 20%); /* Dark gray - 3:1 contrast */
523+
--input: hsl(230 15% 20%); /* Dark gray - 3:1 contrast */
524+
--ring: hsl(262 83% 65%); /* Purple ring - matches primary */
531525

532526
/* Chart colors - WCAG AA compliant */
533-
--chart-1: oklch(0.65 0.2 250); /* Light blue */
534-
--chart-2: oklch(0.7 0.15 150); /* Light green */
535-
--chart-3: oklch(0.75 0.2 50); /* Light yellow */
536-
--chart-4: oklch(0.7 0.2 300); /* Light purple */
537-
--chart-5: oklch(0.68 0.2 20); /* Light orange */
538-
539-
/* Sidebar colors - Apple-style white text */
540-
--sidebar: oklch(0.18 0 0); /* Dark gray */
541-
--sidebar-foreground: oklch(1 0 0); /* White - Apple-style */
542-
--sidebar-primary: oklch(0.7 0.15 250); /* Light blue */
543-
--sidebar-primary-foreground: oklch(1 0 0); /* White - Apple-style */
544-
--sidebar-accent: oklch(0.25 0 0); /* Dark gray */
545-
--sidebar-accent-foreground: oklch(1 0 0); /* White - Apple-style */
546-
--sidebar-border: oklch(0.3 0 0); /* Medium gray - 3:1 contrast */
547-
--sidebar-ring: oklch(0.6 0.2 250); /* Light blue ring - 3:1 contrast */
527+
--chart-1: hsl(220 70% 60%); /* Light blue */
528+
--chart-2: hsl(160 55% 55%); /* Light green */
529+
--chart-3: hsl(40 80% 60%); /* Light yellow-orange */
530+
--chart-4: hsl(280 60% 65%); /* Light purple */
531+
--chart-5: hsl(15 75% 60%); /* Light orange */
532+
533+
/* Sidebar colors - Dark mode */
534+
--sidebar: hsl(230 25% 12%); /* Dark gray with blue tint */
535+
--sidebar-foreground: hsl(0 0% 95%); /* Near white */
536+
--sidebar-primary: hsl(262 83% 65%); /* Brighter purple */
537+
--sidebar-primary-foreground: hsl(0 0% 100%); /* White */
538+
--sidebar-accent: hsl(230 20% 18%); /* Dark gray */
539+
--sidebar-accent-foreground: hsl(0 0% 95%); /* Near white */
540+
--sidebar-border: hsl(230 15% 20%); /* Dark gray - 3:1 contrast */
541+
--sidebar-ring: hsl(262 83% 65%); /* Purple ring - matches primary */
548542
}
549543

550544
/* ============================================================================

0 commit comments

Comments
 (0)