Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web): switched-off controls stay visible in dark mode #14984

MergedGigioxx(GitHub profile, opens in a new tab)merged 3 commits intomain fromrefs/pull/14984/headmerged by juliusmarminge View on GitHub

Showing 2 changed files with 9 additions and 4 deletions.

x
0 of 2 viewed, 2 left
8 additions and 3 deletionsapps/web/src/components/settings/EnvironmentRow.tsxModified
View file
@@ -83,12 +83,17 @@
<div
className={cn(
"grid grid-cols-[auto_minmax(0,1fr)_auto] items-center gap-x-3 px-3 py-2.5 sm:px-4",
- dimmed && "opacity-60",
className,
)}
- <EnvironmentMachineIcon aria-hidden kind={kind} className="size-4 text-muted-foreground" />
- <div className="min-w-0">
+ {/* Dim only the identity so a switched-off row's controls stay readable
+ and distinct from disabled ones. */}
+ <EnvironmentMachineIcon
+ aria-hidden
+ kind={kind}
+ className={cn("size-4 text-muted-foreground", dimmed && "opacity-60")}
+ />
+ <div className={cn("min-w-0", dimmed && "opacity-60")}>
<p className="truncate text-sm font-medium text-foreground">{label}</p>
<div className="truncate text-xs text-muted-foreground">{subtitle}</div>
{below}
1 addition and 1 deletionapps/web/src/components/ui/switch.tsxModified
View file
@@ -35,7 +35,7 @@
<SwitchPrimitive.Thumb
className={cn(
- "pointer-events-none block size-[calc(var(--thumb-size)-2px)] shrink-0 origin-left in-[[role=switch]:active,[data-slot=label]:active,[data-slot=field-label]:active]:not-data-disabled:scale-x-110 in-[[role=switch]:active,[data-slot=label]:active,[data-slot=field-label]:active]:rounded-[var(--thumb-size)/calc(var(--thumb-size)*1.1)] rounded-(--thumb-size) bg-background shadow-sm/5 [transition:translate_.15s,border-radius_.15s,scale_.1s_.1s,transform-origin_.15s] data-checked:origin-right data-checked:translate-x-[calc(var(--thumb-size)-4px)]",