Skip to content

Instantly share code, notes, and snippets.

@taupecat
Created February 8, 2013 14:47
Show Gist options
  • Save taupecat/4739443 to your computer and use it in GitHub Desktop.
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.
@mixin hover-state {
&:hover, &:active, &:focus {
@content;
}
}
a {
text-decoration: none;
@include hover-state {
text-decoration: underline;
}
}
@ogbaoghene
Copy link

I had the same idea, but decided to include the option for combinations. Here's my [approach].(https://gist.github.com/840ad2a1b42cf7ff5d5e.git)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment