Closed themensch closed 6 months ago
::selection {
background-color: var(--text-selection);
}
⬇
--text-selection: var(--background-modifier-hover);
⬇
--background-modifier-hover: hsla(var(--interactive-accent-base-hsl), 90%);
⬇ (assuming accent color is 'cyan')
--interactive-accent-base-hsl: var(--color-cyan-base-hsl);
--interactive-accent-text-hsl: var(--color-cyan-text-hsl);
...
As a quick fix, this snippet works for me:
body {
--text-selection: hsla(var(--interactive-accent-text-hsl), 80%) !important;
}
Modifying --background-modifier-hover
breaks other things, so I directly edited the --text-selection
.
::selection { background-color: var(--text-selection); }
⬇
--text-selection: var(--background-modifier-hover);
⬇
--background-modifier-hover: hsla(var(--interactive-accent-base-hsl), 90%);
⬇ (assuming accent color is 'cyan')
--interactive-accent-base-hsl: var(--color-cyan-base-hsl); --interactive-accent-text-hsl: var(--color-cyan-text-hsl); ...
Fix
As a quick fix, this snippet works for me:
body { --text-selection: hsla(var(--interactive-accent-text-hsl), 80%) !important; }
Modifying
--background-modifier-hover
breaks other things, so I directly edited the--text-selection
.
Adding this css snipped as suggested works great for me, thank you! I will continue to observe to make sure there are no Unintended Consequences™.
Hi @themensch, This should now be addressed in Prism 3.4.4.
In the dark mode themes (I've tried them all) the color to indicate selected text is very faint and regardless of any tweaks I make, I cannot make it more visually distinct.
OSes tested: macOS 14.2, iPadOS 17.2, iOS 17.2 Obsidian Version: 1.4.16 Plugin Versions: Style Settings 1.02 Theme Version: 3.4.3
A previous issue #53 solved this problem for light mode themes.
I hope there is a way to apply the same adjustment to dark mode themes so that selected text is easier to see. The problem is less pronounced on mobile because there are constraint indicators for selected text.