-
-
Save daxdax89/aec3a4271720f0dcd8a818d803ffcd1f to your computer and use it in GitHub Desktop.
SCSS hover-active mixin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@mixin hover-active { | |
&:hover { | |
.no-touch & { | |
@content; | |
} | |
} | |
&:active { | |
.touch & { | |
@content; | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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