Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save davidhellmann/b6c62cc71a5e64e3f7936fa1bcd1a09d to your computer and use it in GitHub Desktop.
Save davidhellmann/b6c62cc71a5e64e3f7936fa1bcd1a09d to your computer and use it in GitHub Desktop.
// When we give an element some ‘attention’.
@mixin attention() {
&:hover,
&:active,
&:focus {
@content;
}
}
a {
font-weight: bold;
text-decoration: none;
color: #c00;
@include attention() {
outline: none;
color: #09f;
}
}
.btn {
background-color: #09f;
@include attention() {
background-color: darken(#09f, 10%);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment