Created
February 13, 2014 20:51
-
-
Save cfree/8983582 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.0.rc.3) | |
// Compass (v1.0.0.alpha.18) | |
// ---- | |
// Mixins | |
@mixin icon($i) { | |
@if $i == form { | |
content: 'A'; | |
} | |
@else if $i == people { | |
content: 'x'; | |
} | |
} | |
@mixin icon-classes($icon, $collection: ()) { | |
.icon-#{$icon}-before { | |
&:before { | |
@include icon($icon); | |
@each $def in $collection { | |
@if length($def) == 2 { | |
#{nth($def,1)}: #{nth($def,2)}; | |
} | |
} | |
} | |
} | |
.icon-#{$icon}-after { | |
&:after { | |
@include icon($icon); | |
@each $def in $collection { | |
@if length($def) == 2 { | |
#{nth($def,1)}: #{nth($def,2)}; | |
} | |
} | |
} | |
} | |
} | |
// Create icon classes | |
@include icon-classes(form); | |
@include icon-classes(people, (margin-right 27px, background-image url('aol.com'), padding, text-shadow '1px 1px 1px #000')); | |
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
.icon-form-before:before { | |
content: 'A'; | |
} | |
.icon-form-after:after { | |
content: 'A'; | |
} | |
.icon-people-before:before { | |
content: 'x'; | |
margin-right: 27px; | |
background-image: url("aol.com"); | |
text-shadow: 1px 1px 1px #000; | |
} | |
.icon-people-after:after { | |
content: 'x'; | |
margin-right: 27px; | |
background-image: url("aol.com"); | |
text-shadow: 1px 1px 1px #000; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment