Created
February 8, 2013 14:47
-
-
Save taupecat/4739443 to your computer and use it in GitHub Desktop.
I'm tired of writing a { &:hover, &:active, &:focus { [blah blah blah] } } all the time in my SCSS. So I wrote a mixin. I can probably make this better. Later.
This file contains 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-state { | |
&:hover, &:active, &:focus { | |
@content; | |
} | |
} | |
a { | |
text-decoration: none; | |
@include hover-state { | |
text-decoration: underline; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I had the same idea, but decided to include the option for combinations. Here's my [approach].(https://gist.github.com/840ad2a1b42cf7ff5d5e.git)