Skip to content

Instantly share code, notes, and snippets.

@mtrythall
Created June 18, 2014 17:13
Show Gist options
  • Save mtrythall/7267446c39a1246df691 to your computer and use it in GitHub Desktop.
Save mtrythall/7267446c39a1246df691 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
<a href="#" class="example1">Hover over Me</a>
<a href="#" class="example2">Hover over Me</a>
// ----
// Sass (v3.3.8)
// Compass (v1.0.0.alpha.19)
// ----
@mixin link-colors($base-color, $new-color: darken($base-color, 30%)) {
color: $base-color;
&:hover {
color: $new-color;
}
}
.example1 {
@include link-colors(tomato);
}
.example2 {
@include link-colors(green, blue);
}
.example1 {
color: tomato;
}
.example1:hover {
color: #ad1a00;
}
.example2 {
color: green;
}
.example2:hover {
color: blue;
}
<a href="#" class="example1">Hover over Me</a>
<a href="#" class="example2">Hover over Me</a>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment