Skip to content

Instantly share code, notes, and snippets.

@iamcarrico
Last active August 29, 2015 14:23
Show Gist options
  • Save iamcarrico/13de5b2cb1da11deea0a to your computer and use it in GitHub Desktop.
Save iamcarrico/13de5b2cb1da11deea0a to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
<div class="button">Apples</div>
<div class="button-green">Bananas</div>
// ----
// Sass (v3.4.14)
// Compass (v1.0.3)
// ----
%button {
width: 100px;
padding: .5em 1em;
margin: 1em 2em;
border-radius: 5px;
}
@mixin button($color: blue) {
@extend %button;
color: $color;
background-color: lighten($color, 30%);
border: 3px solid darken($color, 10%);
}
.button {
@include button;
}
.button-green {
@include button(green);
}
.button, .button-green {
width: 100px;
padding: .5em 1em;
margin: 1em 2em;
border-radius: 5px;
}
.button {
color: blue;
background-color: #9999ff;
border: 3px solid #0000cc;
}
.button-green {
color: green;
background-color: #1aff1a;
border: 3px solid #004d00;
}
<div class="button">Apples</div>
<div class="button-green">Bananas</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment