Skip to content

Instantly share code, notes, and snippets.

@daxdax89
Forked from danro/1-mixin.scss
Created September 6, 2019 07:23
Show Gist options
  • Save daxdax89/aec3a4271720f0dcd8a818d803ffcd1f to your computer and use it in GitHub Desktop.
Save daxdax89/aec3a4271720f0dcd8a818d803ffcd1f to your computer and use it in GitHub Desktop.
SCSS hover-active mixin
@mixin hover-active {
&:hover {
.no-touch & {
@content;
}
}
&:active {
.touch & {
@content;
}
}
}
a {
@include hover-active {
border: 1px solid red;
color: blue;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment