Skip to content

Commit 84a7bff

Browse files
authored
fix(VListItem): respect link & canvas colors in forced-colors mode (#22032)
1 parent a3ddcf1 commit 84a7bff

File tree

1 file changed

+20
-18
lines changed

1 file changed

+20
-18
lines changed

packages/vuetify/src/components/VList/VListItem.sass

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -341,26 +341,28 @@
341341

342342
@media (forced-colors: active)
343343
.v-list-item
344-
&:not(&--active)
344+
&--link:not(&--active)
345345
color: buttontext
346346

347-
&--variant-plain.v-list-item--active
348-
color: highlight !important
349-
350-
&:not(&--variant-plain).v-list-item--active
351-
background-color: highlight !important
352-
color: highlighttext !important
353-
354-
&-title
355-
forced-color-adjust: preserve-parent-color
356-
357-
&--active
358-
.v-list-item__prepend,
359-
.v-list-item__append
360-
> .v-badge .v-icon,
361-
> .v-icon
362-
forced-color-adjust: preserve-parent-color
363-
347+
&--link[href]:not(&--active)
348+
color: unset
349+
350+
&--active:not(&--disabled)
351+
[class*="v-list-item-"],
352+
[class*="v-list-item-"] > *,
353+
.v-icon
354+
color: highlight !important
355+
356+
&--active:not(&--variant-text, &--variant-plain):not(&--disabled)
357+
background: highlight !important
358+
359+
[class*="v-list-item-"],
360+
[class*="v-list-item-"] > *,
361+
.v-icon
362+
opacity: 1
363+
color: highlighttext !important
364+
forced-color-adjust: preserve-parent-color
365+
364366
@supports selector(:focus-visible)
365367
&::after
366368
color: buttontext

0 commit comments

Comments
 (0)