Skip to content

Commit 7da124e

Browse files
✨ Enhance accessibility by improving text opacity and contrast in platform switcher component
1 parent b50a320 commit 7da124e

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

resources/css/app.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@ nav > ul > li > ul {
4646
@apply font-normal;
4747

4848
& a {
49-
@apply ml-3 block w-full border-l py-1.5 pl-3 transition-all duration-200 dark:border-white/10;
49+
@apply ml-3 block w-full border-l-[1.5px] py-1.5 pl-3 transition-all duration-200 dark:border-white/10;
5050
}
5151

5252
&.exact-active a {
53-
@apply border-violet-400 text-violet-400 dark:border-violet-400/90;
53+
@apply border-violet-400 font-medium text-violet-800/80 dark:border-violet-400/90 dark:text-white;
5454
}
5555

5656
&:hover a {
@@ -139,7 +139,7 @@ nav > ul > li > ul {
139139

140140
:root {
141141
--docsearch-container-background: rgba(0, 0, 0, 0.5);
142-
--docsearch-primary-color: #00aaa6;
142+
--docsearch-primary-color: #a78bfa;
143143
}
144144

145145
[id='docsearch'] {

resources/views/components/platform-switcher.blade.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class="space-y-1.5"
2121
{{-- Title --}}
2222
<div class="text-sm">Choose your platform</div>
2323
{{-- Description --}}
24-
<div class="text-xs text-gray-500">
24+
<div class="text-xs opacity-60">
2525
Switch between mobile and desktop documentation.
2626
</div>
2727
</div>
@@ -42,7 +42,7 @@ class="flex items-center gap-3 text-xs"
4242
@class([
4343
'flex w-1/2 items-center justify-center gap-x-1.5 gap-y-1 rounded-xl transition duration-300 ease-in-out',
4444
'bg-white dark:bg-gray-900' => ! $isMobile,
45-
'hover:bg-zinc-200/50 dark:text-gray-500 dark:hover:bg-gray-900/80 dark:hover:text-white' => $isMobile,
45+
'hover:bg-zinc-200/50 dark:text-gray-400/80 dark:hover:bg-gray-900/80 dark:hover:text-white' => $isMobile,
4646
])
4747
:class="{ 'flex-col p-2.5': !scrolled, 'flex-row p-2': scrolled }"
4848
>
@@ -60,7 +60,7 @@ class="flex items-center gap-3 text-xs"
6060
{{-- Center icon --}}
6161
<svg
6262
xmlns="http://www.w3.org/2000/svg"
63-
class="size-6 dark:text-gray-500"
63+
class="size-6 dark:text-gray-400/80"
6464
viewBox="0 0 256 256"
6565
>
6666
<path
@@ -75,7 +75,7 @@ class="size-6 dark:text-gray-500"
7575
@class([
7676
'flex w-1/2 items-center justify-center gap-x-1.5 gap-y-1 rounded-xl transition duration-300 ease-in-out',
7777
'bg-white dark:bg-gray-900' => $isMobile,
78-
'hover:bg-zinc-200/50 dark:text-gray-500 dark:hover:bg-gray-900/80 dark:hover:text-white' => ! $isMobile,
78+
'hover:bg-zinc-200/50 dark:text-gray-400/80 dark:hover:bg-gray-900/80 dark:hover:text-white' => ! $isMobile,
7979
])
8080
:class="{ 'flex-col p-2.5': !scrolled, 'flex-row p-2': scrolled }"
8181
>

0 commit comments

Comments
 (0)