From 503dfba71979fc388853e1bdc561bb62b28f02a2 Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Tue, 9 Apr 2024 17:19:31 -0600 Subject: [PATCH] Fix button colors (#10915) * Simplify button colors * fix colors * Add back in colors * Fix color vars --- .../components/filter/ReviewFilterGroup.tsx | 33 +++++---- .../overlay/MobileReviewSettingsDrawer.tsx | 15 ++-- web/src/components/ui/button.tsx | 2 +- web/tailwind.config.js | 5 +- web/themes/theme-default.css | 68 +++++++++---------- 5 files changed, 66 insertions(+), 57 deletions(-) diff --git a/web/src/components/filter/ReviewFilterGroup.tsx b/web/src/components/filter/ReviewFilterGroup.tsx index e5543fce9..036f30a36 100644 --- a/web/src/components/filter/ReviewFilterGroup.tsx +++ b/web/src/components/filter/ReviewFilterGroup.tsx @@ -222,14 +222,15 @@ function CamerasFilterButton({ const trigger = ( @@ -420,14 +422,15 @@ function CalendarFilterButton({ const trigger = ( diff --git a/web/src/components/overlay/MobileReviewSettingsDrawer.tsx b/web/src/components/overlay/MobileReviewSettingsDrawer.tsx index e650f583d..a7c8069c1 100644 --- a/web/src/components/overlay/MobileReviewSettingsDrawer.tsx +++ b/web/src/components/overlay/MobileReviewSettingsDrawer.tsx @@ -146,22 +146,24 @@ export default function MobileReviewSettingsDrawer({ )} {features.includes("calendar") && ( )} {features.includes("filter") && ( @@ -283,12 +285,13 @@ export default function MobileReviewSettingsDrawer({ > diff --git a/web/src/components/ui/button.tsx b/web/src/components/ui/button.tsx index b3b0e451f..685ab92a2 100644 --- a/web/src/components/ui/button.tsx +++ b/web/src/components/ui/button.tsx @@ -10,7 +10,7 @@ const buttonVariants = cva( variants: { variant: { default: "bg-secondary text-primary hover:bg-secondary/80", - select: "bg-selected text-white hover:bg-opacity-90", + select: "bg-selected text-selected-foreground hover:bg-opacity-90", destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90", outline: diff --git a/web/tailwind.config.js b/web/tailwind.config.js index 524d5b4b0..80cbc4a12 100644 --- a/web/tailwind.config.js +++ b/web/tailwind.config.js @@ -46,7 +46,10 @@ module.exports = { background: "hsl(var(--background))", background_alt: "hsl(var(--background-alt))", foreground: "hsl(var(--foreground))", - selected: "hsl(var(--selected))", + selected: { + DEFAULT: "hsl(var(--selected))", + foreground: "hsl(var(--selected-foreground))", + }, primary: { DEFAULT: "hsl(var(--primary))", foreground: "hsl(var(--primary-foreground))", diff --git a/web/themes/theme-default.css b/web/themes/theme-default.css index 9e0d56253..07b924956 100644 --- a/web/themes/theme-default.css +++ b/web/themes/theme-default.css @@ -1,77 +1,80 @@ @layer base { :root { - --background-hsl: hsl(0 0% 100%); + --background: hsl(0, 0%, 100%); --background: 0 0% 100%; - --background-alt-hsl: hsl(0 0% 98.5%); + --background-alt: hsl(0, 0%, 98.5%); --background-alt: 0 0% 98.5%; - --foreground: hsl(222.2 84% 4.9%); + --foreground: hsl(222.2, 84%, 4.9%); --foreground: 222.2 84% 4.9%; - --card: hsl(0 0% 100%); + --card: hsl(0, 0%, 100%); --card: 0 0% 100%; - --card-foreground: hsl(222.2 84% 4.9%); + --card-foreground: hsl(222.2, 84%, 4.9%); --card-foreground: 222.2 84% 4.9%; - --popover: hsl(0 0% 100%); + --popover: hsl(0, 0%, 100%); --popover: 0 0% 100%; - --popover-foreground: hsl(222.2 84% 4.9%); + --popover-foreground: hsl(222.2, 84%, 4.9%); --popover-foreground: 222.2 84% 4.9%; --primary: hsl(222.2, 37.4%, 11.2%); --primary: 222.2 47.4% 11.2%; - --primary-foreground: hsl(210 40% 98%); + --primary-foreground: hsl(210, 40%, 98%); --primary-foreground: 210 40% 98%; - --secondary: hsl(210 20% 94.1%); + --secondary: hsl(210, 20%, 94.1%); --secondary: 210 20% 94.1%; - --secondary-foreground: hsl(222.2 17.4% 36.2%); + --secondary-foreground: hsl(222.2, 17.4%, 36.2%); --secondary-foreground: 222.2 17.4% 36.2%; --secondary-highlight: hsl(0, 0%, 94%); --secondary-highlight: 0 0% 94%; - --muted: hsl(210 40% 96.1%); + --muted: hsl(210, 40%, 96.1%); --muted: 210 40% 96.1%; - --muted-foreground: hsl(215.4 6.3% 46.9%); + --muted-foreground: hsl(215.4, 6.3%, 46.9%); --muted-foreground: 215.4 6.3% 46.9%; - --accent: hsl(210 40% 96.1%); + --accent: hsl(210, 40%, 96.1%); --accent: 210 40% 96.1%; - --accent-foreground: hsl(222.2 47.4% 11.2%); + --accent-foreground: hsl(222.2, 47.4%, 11.2%); --accent-foreground: 222.2 47.4% 11.2%; - --destructive: hsl(0 84.2% 60.2%); + --destructive: hsl(0, 84.2%, 60.2%); --destructive: 0 84.2% 60.2%; - --destructive-foreground: hsl(0 100% 83%); + --destructive-foreground: hsl(0, 100%, 83%); --destructive-foreground: 0 100% 83%; - --warning: hsl(17 87% 18%); + --warning: hsl(17, 87%, 18%); --warning: 17 87% 18%; - --warning-foreground: hsl(32 100% 74%); + --warning-foreground: hsl(32, 100%, 74%); --warning-foreground: 32 100% 74%; - --border: hsl(214.3 31.8% 91.4%); + --border: hsl(214.3, 31.8%, 91.4%); --border: 214.3 31.8% 91.4%; - --input: hsl(0 0% 85%); + --input: hsl(0, 0%, 85%); --input: 0 0% 85%; - --ring: hsla(0 0% 25% 0%); + --ring: hsla(0, 0%, 25%, 0%); --ring: 0 0% 25% 0%; --selected: hsl(228, 89%, 63%); --selected: 228 89% 63%; + --selected-foreground: hsl(0 0% 100%); + --selected-foreground: 0 0% 100%; + --radius: 0.5rem; --severity_alert: var(--red-800); @@ -94,10 +97,10 @@ } .dark { - --background-hsl: hsl(0 0 0%); + --background: hsl(0, 0, 0%); --background: 0 0% 0%; - --background-alt-hsl: hsl(0 0 9%); + --background-alt: hsl(0, 0, 9%); --background-alt: 0 0% 9%; --foreground: hsl(0, 0%, 100%); @@ -106,7 +109,7 @@ --card: hsl(0, 0%, 15%); --card: 0, 0%, 15%; - --card-foreground: hsl(210 40% 98%); + --card-foreground: hsl(210, 40%, 98%); --card-foreground: 210 40% 98%; --popover: hsl(0, 0%, 15%); @@ -139,31 +142,28 @@ --accent: hsl(0, 0%, 15%); --accent: 0 0% 15%; - --accent-foreground: hsl(210 40% 98%); + --accent-foreground: hsl(210, 40%, 98%); --accent-foreground: 210 40% 98%; - --destructive: hsl(0 62.8% 30.6%); + --destructive: hsl(0, 62.8%, 30.6%); --destructive: 0 62.8% 30.6%; - --destructive-foreground: hsl(0 100% 83%); + --destructive-foreground: hsl(0, 100%, 83%); --destructive-foreground: 0 100% 83%; - --warning: hsl(17 87% 18%); + --warning: hsl(17, 87%, 18%); --warning: 17 87% 18%; - --warning-foreground: hsl(32 100% 74%); + --warning-foreground: hsl(32, 100%, 74%); --warning-foreground: 32 100% 74%; --border: hsl(0, 0%, 32%); --border: 0 0% 32%; - --input: hsl(0 0% 5%); + --input: hsl(0, 0%, 5%); --input: 0 0% 25%; - --ring: hsla(0 0% 25% 0%); + --ring: hsla(0, 0%, 25%, 0%); --ring: 0 0% 25% 0%; - - --selected: hsl(228, 89%, 63%); - --selected: 228 89% 63%; } }