From b85c26002c376fd15b340e71b1e2225747785365 Mon Sep 17 00:00:00 2001 From: Jos de Jong Date: Thu, 10 Nov 2022 10:26:18 +0100 Subject: [PATCH] fix: improve highlighting color of search matches in dark mode --- src/lib/components/modes/textmode/TextMode.scss | 4 ++++ src/lib/themes/jse-theme-dark.css | 1 + src/lib/themes/jse-theme-default.css | 4 +++- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/lib/components/modes/textmode/TextMode.scss b/src/lib/components/modes/textmode/TextMode.scss index b93af090..ea21dec8 100644 --- a/src/lib/components/modes/textmode/TextMode.scss +++ b/src/lib/components/modes/textmode/TextMode.scss @@ -66,6 +66,10 @@ outline: var(--jse-search-match-active-outline); } + :global(.cm-selectionMatch) { + background-color: var(--jse-search-match-background-color); + } + :global(.cm-foldPlaceholder) { background: var(--jse-tag-background); color: var(--jse-tag-color); diff --git a/src/lib/themes/jse-theme-dark.css b/src/lib/themes/jse-theme-dark.css index dc190b2d..d577a33a 100644 --- a/src/lib/themes/jse-theme-dark.css +++ b/src/lib/themes/jse-theme-dark.css @@ -58,6 +58,7 @@ --jse-selection-background-light-color: #333333; --jse-hover-background-color: #343434; --jse-active-line-background-color: rgba(255, 255, 255, 0.06); + --jse-search-match-background-color: rgba(45, 98, 34, 0.99); /* contents: section of collapsed items in an array */ --jse-collapsed-items-background-color: #333333; diff --git a/src/lib/themes/jse-theme-default.css b/src/lib/themes/jse-theme-default.css index c0ded053..894ac1fc 100644 --- a/src/lib/themes/jse-theme-default.css +++ b/src/lib/themes/jse-theme-default.css @@ -75,9 +75,11 @@ --jse-edit-outline: 2px solid #656565; /* contents: selected or hovered */ - --jse-hover-background-color: rgba(0, 0, 0, 0.06); --jse-selection-background-color: #d3d3d3; --jse-selection-background-light-color: #e8e8e8; + --jse-hover-background-color: rgba(0, 0, 0, 0.06); + --jse-active-line-background-color: rgba(0, 0, 0, 0.06); + --jse-search-match-background-color: #99ff7780; /* contents: section of collapsed items in an array */ --jse-collapsed-items-background-color: #f5f5f5;