We should only show hover states on non-touch devices. Interacting with elements that have a hover-state on touch devices such as mobile or a table leads the hover state "stuck" after interacting with it.
I have previously solved this by wrapping our :hover selector in a designated media query which only enables them when hover is "supported". Look at Switch or Accordion for examples.
@media (hover: hover) and (pointer: fine) {
/** :hover classes here */
}
We should only show
hover
states on non-touch devices. Interacting with elements that have a hover-state on touch devices such as mobile or a table leads the hover state "stuck" after interacting with it.I have previously solved this by wrapping our
:hover
selector in a designated media query which only enables them when hover is "supported". Look atSwitch
orAccordion
for examples.Actions:
Notes: