Skip to content

Instantly share code, notes, and snippets.

@jensgro
Created June 20, 2014 05:55
Show Gist options
  • Save jensgro/752c92c612ced4b1db59 to your computer and use it in GitHub Desktop.
Save jensgro/752c92c612ced4b1db59 to your computer and use it in GitHub Desktop.
hover-mixin
// ----
// Sass (v3.3.8)
// Compass (v1.0.0.alpha.19)
// ----
@mixin hover {
&:hover,
&:focus {
@content;
}
}
a {
font-weight: bold;
text-decoration: none;
color: #c00;
@include hover {
outline: none;
color: #09f;
}
}
.btn {
background-color: #09f;
@include hover {
background-color: darken(#09f, 10%);
}
}
a {
font-weight: bold;
text-decoration: none;
color: #c00;
}
a:hover, a:focus {
outline: none;
color: #09f;
}
.btn {
background-color: #09f;
}
.btn:hover, .btn:focus {
background-color: #007acc;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment