Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -154,11 +154,15 @@
overflow: clip;
}

&:hover:not(&--disabled) {
--item-outline-color: var(--token-color-stroke-action);
--item-outline-width: var(--item-outline-width--hover);
&::after {
z-index: 2;
// Touch browsers keep :hover on the last tapped element
@media (any-hover: hover) {
html:not([data-whatintent='touch'], [data-whatintent='keyboard'])
&:hover:not(&--disabled) {
--item-outline-color: var(--token-color-stroke-action);
--item-outline-width: var(--item-outline-width--hover);
&::after {
z-index: 2;
}
}
}

Expand All @@ -177,6 +181,13 @@
--item-outline-width: var(--item-outline-width--focus);
}

// A tapped row keeps :hover, so do not exclude it on touch devices
html:not([data-whatintent='mouse'])[data-whatinput='keyboard']
&:not(:active):has(.dnb-checkbox__input:focus) {
--item-outline-color: var(--token-color-stroke-action-focus);
--item-outline-width: var(--item-outline-width--focus);
}

html[data-whatinput='keyboard']
&
.dnb-checkbox__input:focus
Expand Down
Loading