-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Add DocSearch button key theme styles for light and dark modes #8076
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
8ef7cdb
51522a1
9a08b68
393bc83
97fea1c
64ac30f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -47,6 +47,12 @@ | |||||||||||||||
| .DocSearch-Button-Keys { | ||||||||||||||||
| @apply hidden! lg:flex!; | ||||||||||||||||
| } | ||||||||||||||||
| .DocSearch-Button-Key { | ||||||||||||||||
| @apply text-gray-700! bg-gray-100! border-gray-300!; | ||||||||||||||||
| } | ||||||||||||||||
| [data-theme="dark"] .DocSearch-Button-Key { | ||||||||||||||||
| @apply text-gray-100! bg-olive-700! border-gray-500!; | ||||||||||||||||
| } | ||||||||||||||||
|
||||||||||||||||
| @apply text-gray-700! bg-gray-100! border-gray-300!; | |
| } | |
| [data-theme="dark"] .DocSearch-Button-Key { | |
| @apply text-gray-100! bg-olive-700! border-gray-500!; | |
| } | |
| @apply text-gray-700! bg-gray-100! border-gray-300! dark:text-gray-100! dark:bg-olive-700! dark:border-gray-500!; | |
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bg-olive-700doesn’t appear to be a defined Tailwind color in this repo (tailwind.config.js only defines blue/gray/white/black/transparent). In dark mode this means the background utility won’t be generated, so the key can end up withtext-gray-100on the inherited lightbg-gray-100(very low contrast). Use an existing color token (e.g. one of the configured grays/blues) or extend the Tailwind theme to includeoliveshades before usingbg-olive-700.