Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dark Mode Selected Text is Hard To See #151

Closed
themensch opened this issue Dec 19, 2023 · 3 comments
Closed

Dark Mode Selected Text is Hard To See #151

themensch opened this issue Dec 19, 2023 · 3 comments
Assignees
Labels
Feature Request Enhancement and/or Feature suggestion

Comments

@themensch
Copy link

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.

@themensch themensch added the Feature Request Enhancement and/or Feature suggestion label Dec 19, 2023
@ShahriarKh
Copy link
Contributor

::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.

@themensch
Copy link
Author

::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™.

@damiankorcz
Copy link
Owner

Hi @themensch,
This should now be addressed in Prism 3.4.4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request Enhancement and/or Feature suggestion
Projects
None yet
Development

No branches or pull requests

3 participants