Created
September 16, 2014 22:35
-
-
Save MichaelArestad/cc99478c4b12387a94d2 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---- | |
// Sass (v3.3.14) | |
// Compass (v1.0.1) | |
// ---- | |
// Color variables | |
$darkwing-duck-purple: #582e76; | |
$launchpad-red: #7e1a03; | |
// Placeholder selector for @extend | |
%button { | |
border-radius: 3px; | |
font-size: 13px; | |
} | |
// Mixin | |
@mixin button($background: blue) { | |
@extend %button; | |
background: $background; | |
border-color: darken($background, 5%); | |
} | |
// Map that sets options | |
$buttons:( | |
primary:( | |
background: $darkwing-duck-purple, | |
), | |
secondary:( | |
background: $launchpad-red, | |
) | |
); | |
// Loopy loop loop | |
@each $type in map-keys($buttons) { | |
.button-#{$type} { | |
$button-color: map-get(map-get($buttons, $type), background); | |
@include button($button-color); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.button-primary, .button-secondary { | |
border-radius: 3px; | |
font-size: 13px; | |
} | |
.button-primary { | |
background: #582e76; | |
border-color: #4a2764; | |
} | |
.button-secondary { | |
background: #7e1a03; | |
border-color: #651502; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment