From 729a32610ae0c0cd5138448efd0c6a10c72e5f2f Mon Sep 17 00:00:00 2001 From: SiriusXT <1160925501@qq.com> Date: Mon, 12 May 2025 14:09:35 +0800 Subject: [PATCH] fix(ui): Avoid the background invisible when selecting text with background color --- apps/client/src/stylesheets/style.css | 4 ++++ apps/client/src/stylesheets/theme-next-dark.css | 2 ++ apps/client/src/stylesheets/theme-next-light.css | 2 ++ 3 files changed, 8 insertions(+) diff --git a/apps/client/src/stylesheets/style.css b/apps/client/src/stylesheets/style.css index 544b6581b..16fb87aef 100644 --- a/apps/client/src/stylesheets/style.css +++ b/apps/client/src/stylesheets/style.css @@ -1222,6 +1222,10 @@ body:not(.mobile) #launcher-pane.horizontal .dropdown-submenu > .dropdown-menu { background-color: inherit; } +::selection { + background-color: var(--selection-background-color); +} + [data-bs-toggle="tooltip"]:not(.button-widget) span { padding-bottom: 0; border-bottom: 1px dotted; diff --git a/apps/client/src/stylesheets/theme-next-dark.css b/apps/client/src/stylesheets/theme-next-dark.css index 98f379c6e..d8d472097 100644 --- a/apps/client/src/stylesheets/theme-next-dark.css +++ b/apps/client/src/stylesheets/theme-next-dark.css @@ -195,6 +195,8 @@ --scrollbar-background-color: transparent; --scrollbar-border-color: unset; /* Deprecated */ + --selection-background-color: #3399FF70; + --link-color: lightskyblue; --mermaid-theme: dark; diff --git a/apps/client/src/stylesheets/theme-next-light.css b/apps/client/src/stylesheets/theme-next-light.css index 7793d8ece..bdf3ae228 100644 --- a/apps/client/src/stylesheets/theme-next-light.css +++ b/apps/client/src/stylesheets/theme-next-light.css @@ -194,6 +194,8 @@ --scrollbar-background-color: transparent; --scrollbar-border-color: unset; /* Deprecated */ + --selection-background-color: #3399FF70; + --link-color: blue; --mermaid-theme: default;