Skip to content

Instantly share code, notes, and snippets.

@MichaelArestad
Created July 24, 2014 16:03
Show Gist options
  • Select an option

  • Save MichaelArestad/9e777a74c0b71572fc7a to your computer and use it in GitHub Desktop.

Select an option

Save MichaelArestad/9e777a74c0b71572fc7a to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.3.10)
// Compass (v1.0.0.alpha.20)
// ----
$πŸŒ‹:(
πŸ…: tomato,
πŸ™Š: brown,
πŸ™ˆ: SaddleBrown,
🍺: DarkGoldenRod
);
$🍻:(
🍺:(),
πŸ…:(
🐨: map-get($πŸŒ‹, πŸ…),
),
πŸ’©:(
🐨: map-get($πŸŒ‹,πŸ™Š),
⚑️: map-get($πŸŒ‹,πŸ™ˆ)
),
);
// Base button styles via an extend
%🍺 {
display: inline-block;
margin: 0;
padding: .4em .9em;
border-width: 1px 1px 2px;
border-style: solid;
border-radius: em(3);
text-decoration: none;
white-space: nowrap;
cursor: pointer;
appearance: none;
box-shadow: 0 -1px 0 rgba(255,255,255,0.15) inset;
&:active {
border-width: 2px 1px 1px
}
}
// The Mixin
@mixin 🍺($map...) {
@extend %🍺;
@each $πŸ• in $map {
// Defaults
$🐸: #fff;
@if map-has-key($πŸ•, 🐨) {
$🐸: map-get($πŸ•, 🐨);
}
$πŸš€: #fff;
@if map-has-key($πŸ•, ⚑️) {
$πŸš€: map-get($πŸ•, ⚑️);
}
background: $🐸;
color: $πŸš€;
}
}
// Magic
@each $πŸ• in map-keys($🍻) {
.πŸŽ‰#{$πŸ•} {
@include 🍺(map-get($🍻, $πŸ•));
}
}
@charset "UTF-8";
.πŸŽ‰πŸΊ, .πŸŽ‰πŸ…, .πŸŽ‰πŸ’© {
display: inline-block;
margin: 0;
padding: .4em .9em;
border-width: 1px 1px 2px;
border-style: solid;
border-radius: em(3);
text-decoration: none;
white-space: nowrap;
cursor: pointer;
appearance: none;
box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.15) inset;
}
.πŸŽ‰πŸΊ:active, .πŸŽ‰πŸ…:active, .πŸŽ‰πŸ’©:active {
border-width: 2px 1px 1px;
}
.πŸŽ‰πŸΊ {
background: white;
color: white;
}
.πŸŽ‰πŸ… {
background: tomato;
color: white;
}
.πŸŽ‰πŸ’© {
background: brown;
color: saddlebrown;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment