Created
April 8, 2014 22:03
-
-
Save trub/10200004 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
| // ---- | |
| // libsass (v0.7.0) | |
| // ---- | |
| // common @each loop | |
| /*-----------------------------------------*/ | |
| $icons: as bs cs; | |
| @each $icon in $icons { | |
| .icon-#{$icon} { | |
| background-image: url(/images/icons/#{icon}.png); | |
| } | |
| } | |
| // method use multiplte objects in array | |
| /*-----------------------------------------*/ | |
| $icon-chars: (twitter 'e0001' blue) (facebook 'e0002' green); | |
| @each $icon in $icon-chars { | |
| .#{nth($icon, 1)}-icon { | |
| color: nth($icon, 3); | |
| &:after { | |
| content: '#{nth($icon, 2)}'; | |
| } | |
| } | |
| } |
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-as { | |
| background-image: url(/images/icons/icon.png); } | |
| .icon-bs { | |
| background-image: url(/images/icons/icon.png); } | |
| .icon-cs { | |
| background-image: url(/images/icons/icon.png); } | |
| /*-----------------------------------------*/ | |
| .twitter-icon { | |
| color: blue; } | |
| .twitter-icon:after { | |
| content: 'e0001'; } | |
| .facebook-icon { | |
| color: green; } | |
| .facebook-icon:after { | |
| content: 'e0002'; } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment