Last active
January 29, 2016 05:00
-
-
Save souporserious/af784c3898747c6c0a38 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
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
// ---- | |
// libsass (v3.3.2) | |
// ---- | |
@mixin link($link, $hover: $link, $active: $link, $focus: $link, $visited: $link) { | |
$sameProps: (); | |
& { | |
@if $hover != $link { | |
&:hover { | |
color: $hover; | |
} | |
} @else { | |
$sameProps: append($sameProps, '&:hover', comma) | |
} | |
@if $active != $link { | |
&:active { | |
color: $active; | |
} | |
} @else { | |
$sameProps: append($sameProps, '&:active', comma) | |
} | |
@if $focus != $link { | |
&:focus { | |
color: $focus; | |
} | |
} @else { | |
$sameProps: append($sameProps, '&:focus', comma) | |
} | |
@if $visited != $link { | |
&:visited { | |
color: $visited; | |
} | |
} @else { | |
$sameProps: append($sameProps, '&:visited', comma) | |
} | |
&, #{$sameProps} { | |
color: $link; | |
} | |
} | |
} | |
a { | |
@include link(red, green, blue) | |
} |
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
a:hover { | |
color: green; | |
} | |
a:active { | |
color: blue; | |
} | |
a, a:focus, a:visited { | |
color: red; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment