Fix: Prevent parent hover background when hovering subtasks/blocking tasks

Added CSS :has() selector to remove parent card hover background and shadow
when the mouse is over the subtasks or blocking tasks containers. This prevents
the washed-out appearance from compounding backgrounds.

Now subtasks and blocking tasks have independent hover states from their parent.
This commit is contained in:
callumalpass 2025-11-16 21:14:29 +11:00
parent 5f0da434c1
commit 83f17cf5d6

View file

@ -35,6 +35,12 @@
box-shadow: 0 1px 3px color-mix(in srgb, var(--tn-shadow-color, black) 5%, transparent);
}
/* Prevent parent hover when hovering over subtasks or blocking tasks */
.tasknotes-plugin .task-card:has(.task-card__subtasks:hover, .task-card__blocking:hover) {
background-color: transparent;
box-shadow: none;
}
.tasknotes-plugin .task-card:focus {
background-color: var(--tn-interactive-hover);
outline: 2px solid color-mix(in srgb, var(--tn-interactive-accent) 30%, transparent);