Skip to content

Instantly share code, notes, and snippets.

@worst-developer
Created January 18, 2016 11:17
Show Gist options
  • Save worst-developer/d812705d68b8edfd827e to your computer and use it in GitHub Desktop.
Save worst-developer/d812705d68b8edfd827e to your computer and use it in GitHub Desktop.
//*******************scss***********************
%button {
border-radius: 4px;
border: 4px solid black;
}
@mixin button($name, $background-color) {
.#{$name}-button {
background-color: $background-color;
@extend %button;
}
}
@include button('search', blue);
@include button('cancel', red);
//*********************************css out********************************
.search-button, .cancel-button {
border-radius: 4px;
border: 4px solid black;
}
.search-button {
background-color: blue;
}
.cancel-button {
background-color: red;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment