Skip to content

Instantly share code, notes, and snippets.

@realph
Created January 8, 2015 15:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save realph/ccc0411019e79c982a8d to your computer and use it in GitHub Desktop.
Save realph/ccc0411019e79c982a8d to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
<a class="button-pri">Primary Button</a>
<a class="button-sec">Primary Button</a>
// ----
// Sass (v3.4.9)
// Compass (v1.0.1)
// ----
$null: null;
@mixin button-style($bg: $null, $color: white) {
background-color: $bg;
color: $color;
@if $bg == $null {
box-shadow: inset 0 0 0 1px $color;
}
}
.button-pri {
@include button-style($bg: red);
}
.button-sec {
@include button-style($color: red);
}
.button-pri {
background-color: red;
color: white;
}
.button-sec {
color: red;
box-shadow: inset 0 0 0 1px red;
}
<a class="button-pri">Primary Button</a>
<a class="button-sec">Primary Button</a>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment