mirror of
https://github.com/logseq/logseq.git
synced 2026-04-24 22:25:01 +00:00
fix highlighted text color
This commit is contained in:
4
deps/shui/src/logseq/shui/list_item/v1.cljs
vendored
4
deps/shui/src/logseq/shui/list_item/v1.cljs
vendored
@@ -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]]
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user