Skip to content

Instantly share code, notes, and snippets.

@joelworsham
Created October 21, 2014 12:43
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 joelworsham/56712996a737e7fc9ae8 to your computer and use it in GitHub Desktop.
Save joelworsham/56712996a737e7fc9ae8 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.4.6)
// Compass (v1.0.1)
// ----
@mixin icon($icon, $top, $left, $color, $atts: null) {
.icon-#{$icon} {
top: $top;
left: $left;
.color-fill {
background: $color;
}
@if ($atts != null) {
&:before {
@each $key, $value in $atts {
#{$key}: $value;
}
}
}
}
}
// Individual icons
@include icon('fire', 37%, 24%, #dc3c3d);
@include icon('water', 64%, 66%, #535aa1, ('margin-top': 10px));
.icon-fire {
top: 37%;
left: 24%;
}
.icon-fire .color-fill {
background: #dc3c3d;
}
.icon-water {
top: 64%;
left: 66%;
}
.icon-water .color-fill {
background: #535aa1;
}
.icon-water:before {
margin-top: 10px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment