Skip to content

Commit 098c2aa

Browse files
authored
fix: adjust colors in filters ui for better contrast (#1659)
1 parent 926c1c4 commit 098c2aa

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

app/components/ViewModeToggle.vue

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,18 @@ const viewMode = defineModel<ViewMode>({ default: 'cards' })
66

77
<template>
88
<div
9-
class="inline-flex rounded-md border border-border p-0.5 bg-bg-subtle"
9+
class="inline-flex rounded-md border border-border p-0.5 bg-bg-muted"
1010
role="group"
1111
:aria-label="$t('filters.view_mode.label')"
1212
>
1313
<button
1414
type="button"
15-
class="inline-flex items-center px-2.5 py-1.5 text-sm font-medium rounded-sm transition-colors duration-200 focus-visible:ring-2 focus-visible:ring-fg focus-visible:ring-offset-1"
16-
:class="viewMode === 'cards' ? 'bg-bg-muted text-fg' : 'text-fg-muted hover:text-fg'"
15+
class="inline-flex items-center px-2.5 py-1.5 text-sm font-medium rounded-sm border transition-colors duration-200 focus-visible:ring-2 focus-visible:ring-fg focus-visible:ring-offset-1"
16+
:class="
17+
viewMode === 'cards'
18+
? 'bg-bg-subtle text-fg border-fg-subtle'
19+
: 'text-fg-muted hover:text-fg border-transparent'
20+
"
1721
:aria-pressed="viewMode === 'cards'"
1822
:aria-label="$t('filters.view_mode.cards')"
1923
@click="viewMode = 'cards'"
@@ -23,8 +27,12 @@ const viewMode = defineModel<ViewMode>({ default: 'cards' })
2327
</button>
2428
<button
2529
type="button"
26-
class="inline-flex items-center px-2.5 py-1.5 text-sm font-medium rounded-sm transition-colors duration-200 focus-visible:ring-2 focus-visible:ring-fg focus-visible:ring-offset-1"
27-
:class="viewMode === 'table' ? 'bg-bg-muted text-fg' : 'text-fg-muted hover:text-fg'"
30+
class="inline-flex items-center px-2.5 py-1.5 text-sm font-medium rounded-sm border transition-colors duration-200 focus-visible:ring-2 focus-visible:ring-fg focus-visible:ring-offset-1"
31+
:class="
32+
viewMode === 'table'
33+
? 'bg-bg-subtle text-fg border-fg-subtle'
34+
: 'text-fg-muted hover:text-fg border-transparent'
35+
"
2836
:aria-pressed="viewMode === 'table'"
2937
:aria-label="$t('filters.view_mode.table')"
3038
@click="viewMode = 'table'"

0 commit comments

Comments
 (0)