Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Add hover events just for devices without touch capabilities
// .no-touch should be applied to the `html` or `body` elements with Modernizr or other script.
@mixin hover {
.no-touch & {
&:hover {
@content;
}
}
}
.panel {
background-color: red;
@include hover {
background-color: blue;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.