Style for inactive window's selection-background-color?

When creating a stylesheet for TaskPaper, you can set the selection color with:

editor { selection-background-color: @selection-color; }

However, when the window loses focus, the selected text reverts to a different selection color. This is especially troublesome with dark themes, where the selection color becomes off-white and washes out the underlying highlighted text. Is there a style setting for this?

I don’t see this happening? If you mean to drag a TaskPaper document off center on the screen and then click on the desktop, all my TaskPaper background colors and text colors remain the same when not focused - including a dark or a black background with light grey text. Only the header bar fades out as the window is no longer selected. Here is the code I am using that defines my background color (this is a beige background color document):

// -----------------------------------------
// ------------ DOCUMENT BASICS ------------
// -----------------------------------------

@tint-color: rgb(111,111,111);

@background-color: mix(orange, beige, 15%);
@selection-color: mix(@tint-color, @background-color, 50%);
@invisibles-color: mix(@tint-color, @background-color, 100%);
@searchbar-background-color: rgb(92%,92%,92%);
@searchbar-error-text-color: rgb(100%,0%,0%);

// -----------------------------------------
// ---------- DOCUMENT APPEARANCE ----------
// -----------------------------------------

window {
  appearance: NSAppearanceNameVibrantLight;
editor {
  guide-line-color: mix(@tint-color, @background-color, 45%);
item {
  handle-color: mix(black, white, .1%);
item[filtered] {
  handle-color: mix(black, green, 80%);

No, I’m talking about the highlight color of selected text when the window is not focused. It’s easy to reproduce with your stylesheet.

Steps to reproduce:
1.) Use the stylesheet you provided
2.) Select (highlight) some text on a TaskPaper document.
3.) Click over to some other application or your Mac desktop, leaving that text selected
4.) The text you selected now has its highlight color change to grey, rendering dark themed light text underneath essentially unreadable.

The effect is lessened when appearance: NSAppearanceNameVibrantDark; is set, but for dark themes that leave the sidebar with appearance: NSAppearanceNameVibrantLight;, this is effect is especially pronounced.

I see, said the blind carpenter, as he picked up the hammer and saw. :wink:

I misunderstood your question. Yes, that clarifies it. This looks like a setting that may be in the default (.less) style sheet. If so, there may yet be a way to correct this. Have to ask Jessie or others though. Pretty sure it can be done, not confident enough to say how it can be done.

Good luck.