fix: improve dark mode styling and contrast

- Set dark mode as default (class="dark" on html)
- Update dark mode CSS variables for better contrast
- Fix popover/select dropdown colors
- Improve SelectItem hover and focus states
This commit is contained in:
2026-02-01 23:24:09 +03:00
parent fcbf668327
commit 9223c719cc
3 changed files with 18 additions and 18 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
<!doctype html> <!doctype html>
<html lang="en"> <html lang="en" class="dark">
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" /> <link rel="icon" type="image/svg+xml" href="/vite.svg" />
+2 -2
View File
@@ -73,7 +73,7 @@ const SelectContent = React.forwardRef<
<SelectPrimitive.Content <SelectPrimitive.Content
ref={ref} ref={ref}
className={cn( className={cn(
"relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border border-border/40 bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 duration-200", "relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border border-border bg-popover text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 duration-200",
position === "popper" && position === "popper" &&
"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
className className
@@ -116,7 +116,7 @@ const SelectItem = React.forwardRef<
<SelectPrimitive.Item <SelectPrimitive.Item
ref={ref} ref={ref}
className={cn( className={cn(
"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent/50 focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 transition-colors", "relative flex w-full cursor-default select-none items-center rounded-sm py-2 pl-8 pr-2 text-sm outline-none focus:bg-primary/20 focus:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 transition-colors hover:bg-muted",
className className
)} )}
{...props} {...props}
+15 -15
View File
@@ -42,37 +42,37 @@
} }
.dark { .dark {
--background: 0 0% 3.9%; --background: 220 13% 10%; /* Dark blue-gray like Telegram dark mode */
--foreground: 0 0% 98%; --foreground: 0 0% 98%;
--card: 0 0% 3.9%; --card: 220 13% 12%;
--card-foreground: 0 0% 98%; --card-foreground: 0 0% 98%;
--popover: 0 0% 3.9%; --popover: 220 13% 15%; /* Slightly lighter for dropdown menus */
--popover-foreground: 0 0% 98%; --popover-foreground: 0 0% 98%;
--primary: 148 100% 40%; /* Kurdish green dark */ --primary: 148 100% 40%; /* Kurdish green dark */
--primary-foreground: 0 0% 9%; --primary-foreground: 0 0% 98%;
--secondary: 358 84% 60%; /* Kurdish red dark */ --secondary: 358 84% 60%; /* Kurdish red dark */
--secondary-foreground: 0 0% 9%; --secondary-foreground: 0 0% 98%;
--muted: 52 100% 30%; /* Kurdish yellow dark muted */ --muted: 220 13% 18%; /* Subtle gray for muted backgrounds */
--muted-foreground: 0 0% 98%; --muted-foreground: 0 0% 70%; /* Light gray text for muted */
--accent: 52 100% 45%; /* Kurdish yellow dark */ --accent: 52 100% 50%; /* Kurdish yellow - bright for visibility */
--accent-foreground: 0 0% 9%; --accent-foreground: 0 0% 9%; /* Dark text on yellow */
--destructive: 358 84% 52%; --destructive: 358 84% 52%;
--destructive-foreground: 0 0% 98%; --destructive-foreground: 0 0% 98%;
--border: 0 0% 14.9%; --border: 220 13% 20%;
--input: 0 0% 14.9%; --input: 220 13% 18%;
--ring: 148 100% 40%; --ring: 148 100% 40%;
--chart-1: 148 100% 40%; --chart-1: 148 100% 40%;
--chart-2: 358 84% 60%; --chart-2: 358 84% 60%;
--chart-3: 52 100% 45%; --chart-3: 52 100% 45%;
--chart-4: 148 100% 30%; --chart-4: 148 100% 30%;
--chart-5: 358 84% 50%; --chart-5: 358 84% 50%;
--sidebar-background: 0 0% 7%; --sidebar-background: 220 13% 8%;
--sidebar-foreground: 0 0% 98%; --sidebar-foreground: 0 0% 98%;
--sidebar-primary: 148 100% 40%; --sidebar-primary: 148 100% 40%;
--sidebar-primary-foreground: 0 0% 9%; --sidebar-primary-foreground: 0 0% 98%;
--sidebar-accent: 52 100% 45%; --sidebar-accent: 52 100% 50%;
--sidebar-accent-foreground: 0 0% 9%; --sidebar-accent-foreground: 0 0% 9%;
--sidebar-border: 0 0% 14.9%; --sidebar-border: 220 13% 20%;
--sidebar-ring: 148 100% 40%; --sidebar-ring: 148 100% 40%;
} }
} }