Selection background color not showing up in custom theme

Hello! I tried writing my own port of the Rosé Pine theme for LogSeq, but one thing I have not managed to get working is the background color for selected text. I thought the --ls-selection-background-color would take care of it, but it doesn’t seem to be the case.

Screen Recording 2024-03-29 at 5.38.44 PM

1 Like

I solved it by adding this block:

html[data-color='none'] {
    ::selection {
        background-color: var(--ls-selection-background-color);

It seems that ::selection was being used within html[data-color='none'], not html[data-theme=dark] which was the only thing I was really selecting.

1 Like