Created
April 6, 2015 08:21
-
-
Save lukephills/61b73454dad73182130e to your computer and use it in GitHub Desktop.
Hover states - Quickly fix hover/normal states if you don’t need to style every state differently.
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
/** | |
* Normal States | |
*/ | |
@mixin normal { | |
&:link, | |
&:visited { | |
@content; | |
} | |
} | |
/** | |
* Hover States | |
*/ | |
@mixin hover { | |
&:hover, | |
&:focus, | |
&:active { | |
@content; | |
} | |
} | |
-----------USAGE----------- | |
.myclass { | |
background: red; | |
@include hover { | |
background: green; | |
text-decoration: none; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment