feat: fix highlighted text foreground color. #21
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue
When using the theme the foreground color of the selected text is too similar to the background color set by logseq on selection. This is bad from an accessabilty standpoint and makes using logseq with this theme harder due to missing contrast.
Background
logseq-catppuccin sets the foreground color only while leaving it to the logseq default theme to handle the background color.
Solution
I looked at how the obsidian catppuccin theme handled the color of the selection. They introduced an new var
--text-on-accent
that handles the foreground color. It is basically just a new name for the value in--ctp-base
. I added a new var--ls-text-on-accent
recreating this behavior and use this as the value for the selection's foreground color.