Skip to content

Commit

Permalink
Improve legibility of filename match highlighting in dark mode
Browse files Browse the repository at this point in the history
<mark> has its own semantics around text color, which we are now
overriding.
  • Loading branch information
isker committed Jan 17, 2025
1 parent 21222be commit dbac62a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/odd-falcons-play.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"neogrok": patch
---

Improve legibility of filename match highlighting in dark mode
4 changes: 2 additions & 2 deletions src/routes/(search-page)/rendered-content.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,11 @@
enumerate all possible colors emitted by the highlight theme (thus
coupling us to it) in code, so that tailwind could pick them up.
-->
<mark class="bg-yellow-200 dark:bg-yellow-900"
<mark class="bg-yellow-200 dark:bg-yellow-900 text-inherit"
><span style={`color: ${color}`} class={fontClass}>{text}</span></mark
>
{:else if match}
<mark class="bg-yellow-200 dark:bg-yellow-900">{text}</mark>
<mark class="bg-yellow-200 dark:bg-yellow-900 text-inherit">{text}</mark>
{:else if color}
<span style={`color: ${color}`} class={fontClass}>{text}</span>
{:else}
Expand Down

0 comments on commit dbac62a

Please sign in to comment.