fix highlighted text color

This commit is contained in:
Ben Yorke
2023-11-07 16:35:31 +01:00
parent 0453b19e04
commit 1896d372b1
2 changed files with 10 additions and 2 deletions

View File

@@ -29,13 +29,13 @@
(let [[before-text highlighted-text after-text] (split-text-on-highlight text query normal-text normal-query)]
[:span
(when-not (string/blank? before-text) [:span before-text])
(when-not (string/blank? highlighted-text) [:span {:class "bg-accent-06 dark:bg-accent-08-alpha"} highlighted-text])
(when-not (string/blank? highlighted-text) [:span {:class "shui__list-item-highlighted-span bg-accent-06 dark:bg-accent-08-alpha"} highlighted-text])
(when-not (string/blank? after-text) [:span after-text])]))
(defn span-with-multiple-highlight-tokens [app-config text normal-query]
(let [normalized-text (normalize-text app-config text)]
(loop [[query-token & more] (string/split normal-query #" ")
result [[:text (to-string text)]]]
result [[:text (to-string text)]]]
(if-not query-token
(->> result
(map (fn [[type value]]

View File

@@ -300,3 +300,11 @@
.dark .shui__button-theme-color.shui__button-color-sky { background-color: var(--rx-sky-09); &:hover { background-color: var(--rx-sky-08); } &:active { background-color: var(--rx-sky-07); }}
.dark .shui__button-theme-color.shui__button-color-olive { background-color: var(--rx-olive-09); &:hover { background-color: var(--rx-olive-08); } &:active { background-color: var(--rx-olive-07); }}
.dark .shui__button-theme-color.shui__button-color-tomato { background-color: var(--rx-tomato-09); &:hover { background-color: var(--rx-tomato-08); } &:active { background-color: var(--rx-tomato-07); }}
.shui__list-item-highlighted-span {
background-color: or(--lx-accent-06, --color-level-4);
}
.dark .shui__list-item-highlighted-span {
background-color: or(--lx-accent-08-alpha, --color-level-4);
}