Created
October 21, 2014 12:43
-
-
Save joelworsham/56712996a737e7fc9ae8 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
This file contains 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.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)); |
This file contains 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
.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