blog

Apply hover and focus styles only on desktop

...or how to avoid hover and focus styles on touchscreens.

@mixin desktop-hover-focus() {
@media (hover: hover) and (pointer: fine) {
&:hover,
&:focus
{
@content;
}
}
}