Skip to content

Commit 605b5ac

Browse files
committed
fix: update text color to use muted-foreground for better accessibility
1 parent 97f1e41 commit 605b5ac

26 files changed

Lines changed: 50 additions & 50 deletions

src/lib/components/header/Header.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
<Avatar.Image loading="lazy" src="/img/app-icons/svg.svg" alt="SkyCrypt" class="pointer-events-none h-6 select-none" />
5454
{/if}
5555

56-
<Avatar.Fallback class="flex h-full items-center justify-center text-lg font-semibold text-foreground/60 uppercase">SC</Avatar.Fallback>
56+
<Avatar.Fallback class="flex h-full items-center justify-center text-lg font-semibold text-muted-foreground uppercase">SC</Avatar.Fallback>
5757
</Avatar.Root>
5858
</Button.Root>
5959
<div class="flex flex-col items-start justify-center-safe gap-1">
@@ -65,7 +65,7 @@
6565
</Button.Root>
6666

6767
{#if packageVersion}
68-
<Button.Root class="text-xs leading-none font-normal text-foreground/60 transition-colors hover:text-primary/60 data-[cupcake=true]:text-yellow-500/60 data-[cupcake=true]:hover:text-yellow-500" rel="noreferrer" href="https://github.com/SkyCryptWebsite/SkyCrypt-Frontend/releases/tag/v{packageVersion}" target="_blank" data-cupcake={page.url.origin.includes("cupcake") || dev}>v{packageVersion}</Button.Root>
68+
<Button.Root class="text-xs leading-none font-normal text-muted-foreground transition-colors hover:text-primary/60 data-[cupcake=true]:text-yellow-500/60 data-[cupcake=true]:hover:text-yellow-500" rel="noreferrer" href="https://github.com/SkyCryptWebsite/SkyCrypt-Frontend/releases/tag/v{packageVersion}" target="_blank" data-cupcake={page.url.origin.includes("cupcake") || dev}>v{packageVersion}</Button.Root>
6969
{/if}
7070
</div>
7171
</div>

src/lib/components/header/settings/Misc.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
<Tooltip.Provider delayDuration={0}>
6868
<Tooltip.Root>
6969
<Tooltip.Trigger class="flex items-center gap-1">
70-
<CircleQuestionMark class="size-4 h-lh text-foreground/60" />
70+
<CircleQuestionMark class="size-4 h-lh text-muted-foreground" />
7171
</Tooltip.Trigger>
7272

7373
<Tooltip.Content class="performance:bg-popover [&>div:last-child]:hidden rounded-xl bg-transparent glass border text-foreground glass-bg-popover p-4 text-sm">

src/lib/components/header/settings/Packs.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
</div>
5959
</ScrollArea>
6060
{:else}
61-
<p class="text-center text-sm text-foreground/60">No packs available.</p>
61+
<p class="text-center text-sm text-muted-foreground">No packs available.</p>
6262
{/if}
6363
{#if hasPackConfigChanged}
6464
<Button

src/lib/components/header/settings/Themes.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
</Avatar.Root>
103103
<div class="flex flex-col">
104104
<h4 class="font-semibold text-foreground/90">{theme.metadata.name}</h4>
105-
<p class="overflow-hidden font-normal text-ellipsis whitespace-nowrap text-foreground/60">
105+
<p class="overflow-hidden font-normal text-ellipsis whitespace-nowrap text-muted-foreground">
106106
by
107107
<span class="text-foreground/80">{theme.metadata.author}</span>
108108
</p>

src/lib/components/item/GearSlotColumn.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
<div data-slot="gear-slot-column" class={cn("flex shrink-0 flex-col gap-2", className)}>
2020
{#if label}
21-
<span class="text-center text-xs font-semibold tracking-wide text-foreground/60 uppercase">{label}</span>
21+
<span class="text-center text-xs font-semibold tracking-wide text-muted-foreground uppercase">{label}</span>
2222
{/if}
2323

2424
<div class="flex flex-col gap-2">

src/lib/components/item/item-content.svelte

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
{/if}
9595
{#if hasColor}
9696
<div class="mt-4 flex max-w-72 items-center justify-start gap-4 rounded-[0.625rem] bg-foreground/5 p-2 transition-colors ease-out">
97-
<div class="flex items-center gap-2 text-foreground/60">
97+
<div class="flex items-center gap-2 text-muted-foreground">
9898
<TriangleAlert class="size-10" />
9999
<div class="text-sm font-semibold">Due to abuse, all leather armor uses default color values</div>
100100
</div>
@@ -116,9 +116,9 @@
116116
<span class="underline">
117117
{packData.name}
118118
</span>
119-
<span class="text-sm text-foreground/60">{packData.version}</span>
119+
<span class="text-sm text-muted-foreground">{packData.version}</span>
120120
</div>
121-
<div class="text-sm text-foreground/60">
121+
<div class="text-sm text-muted-foreground">
122122
by <span class="text-foreground/80">{packData.author}</span>
123123
</div>
124124
</div>

src/lib/components/misc/CommandSearchGroup.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<Command.LinkItem value={item.ign} href="/stats/{item.ign}" keywords={[item.ign, item.uuid, "profile", "player", "favorite", "favorites"].filter(Boolean) as string[]}>
1616
<Avatar.Root class="size-4 shrink-0 bg-foreground/10">
1717
<Avatar.Image loading="lazy" src={item.uuid ? `https://nmsr.nickac.dev/face/${item.uuid}` : "https://nmsr.nickac.dev/face/bc8ea1f51f253ff5142ca11ae45193a4ad8c3ab5e9c6eec8ba7a4fcb7bac40"} alt={item.ign} class="aspect-square size-4 [image-rendering:pixelated]" />
18-
<Avatar.Fallback class="flex h-full items-center justify-center text-lg font-semibold text-foreground/60 uppercase">
18+
<Avatar.Fallback class="flex h-full items-center justify-center text-lg font-semibold text-muted-foreground uppercase">
1919
{item.ign.slice(0, 2)}
2020
</Avatar.Fallback>
2121
</Avatar.Root>

src/lib/components/misc/ContributorCard.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
{#if typeof Icon === "string"}
6666
<img src={Icon} alt="Technoblade Icon" class="size-4" />
6767
{:else}
68-
<Icon class={cn("size-4", options?.favorite ? "fill-[oklch(75.25%_0.0023_17.21)] stroke-[oklch(75.25%_0.0023_17.21)]" : "text-foreground/60")} />
68+
<Icon class={cn("size-4", options?.favorite ? "fill-[oklch(75.25%_0.0023_17.21)] stroke-[oklch(75.25%_0.0023_17.21)]" : "text-muted-foreground")} />
6969
{/if}
7070
</div>
7171
{/snippet}
@@ -84,7 +84,7 @@
8484
<Button href={options?.tip ? undefined : resolve("/stats/[ign]", { ign: user.id })} class="relative flex h-full w-full min-w-0 items-center gap-4 rounded-xl p-5 text-left glass glass-brightness-150 dark:glass-brightness-50 glass-contrast-60 dark:glass-contrast-100">
8585
<Avatar.Root class="size-16 shrink-0">
8686
<Avatar.Image loading="lazy" src={options?.tip ? "https://nmsr.nickac.dev/face/bc8ea1f51f253ff5142ca11ae45193a4ad8c3ab5e9c6eec8ba7a4fcb7bac40" : `https://nmsr.nickac.dev/face/${user.id}`} alt={user.username} class={cn("aspect-square size-16 [image-rendering:pixelated]", options?.tip ? "rounded-xl bg-foreground/10" : "")} />
87-
<Avatar.Fallback class="flex h-full items-center justify-center rounded-xl bg-foreground/10 text-lg font-semibold text-foreground/60 uppercase">
87+
<Avatar.Fallback class="flex h-full items-center justify-center rounded-xl bg-foreground/10 text-lg font-semibold text-muted-foreground uppercase">
8888
{user.username?.slice(0, 2)}
8989
</Avatar.Fallback>
9090
</Avatar.Root>

src/lib/components/newsroom/PostCard.svelte

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,12 @@
5252
{#if author.mcUuid}
5353
<Avatar.Root class="size-4 shrink-0">
5454
<Avatar.Image loading="lazy" src="https://nmsr.nickac.dev/face/{author.mcUuid}" alt={displayName} class="size-full [image-rendering:pixelated]" />
55-
<Avatar.Fallback class="flex size-full items-center justify-center bg-foreground/10 text-[0.5rem] font-semibold text-foreground/60 uppercase">{initials}</Avatar.Fallback>
55+
<Avatar.Fallback class="flex size-full items-center justify-center bg-foreground/10 text-[0.5rem] font-semibold text-muted-foreground uppercase">{initials}</Avatar.Fallback>
5656
</Avatar.Root>
5757
{/if}
58-
<span class="truncate text-foreground/60">{displayName}</span>
58+
<span class="truncate text-muted-foreground">{displayName}</span>
5959
</div>
60-
<time datetime={post.publishedAt} class="shrink-0 text-foreground/60">{formatDate(post.publishedAt)}</time>
60+
<time datetime={post.publishedAt} class="shrink-0 text-muted-foreground">{formatDate(post.publishedAt)}</time>
6161
</div>
6262

6363
<svelte:element this={as} class="text-xl leading-tight font-bold text-background-foreground transition-colors">{post.title}</svelte:element>

src/lib/components/stats/AdditionStat.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@
5656
{/if}
5757

5858
{#snippet additionalStatLabel()}
59-
<Item.Content class="flex text-base font-bold text-foreground/60 items-center flex-row w-fit">
60-
<div class={!asterisk ? cn("my-0 flex items-center gap-1 font-bold text-foreground/60 data-[is-tooltip=false]:cursor-default", { "text-accent-2": maxed }, className) : "contents"}>
59+
<Item.Content class="flex text-base font-bold text-muted-foreground items-center flex-row w-fit">
60+
<div class={!asterisk ? cn("my-0 flex items-center gap-1 font-bold text-muted-foreground data-[is-tooltip=false]:cursor-default", { "text-accent-2": maxed }, className) : "contents"}>
6161
<div style={textRarityColor ? `color: var(--§${RARITY_COLORS[textRarityColor]})` : ""} class="capitalize">
6262
{text}:
6363
</div>

0 commit comments

Comments
 (0)