Created
August 21, 2013 04:07
-
-
Save ashleahhill/6290223 to your computer and use it in GitHub Desktop.
I like the idea of compass magic selectors, but not the outputted class names.
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
| // Include the selectors for the `$sprite` given the `$map` and the | |
| // `$full-sprite-name` | |
| // @private | |
| @mixin sprite-selectors($map, $sprite-name, $full-sprite-name) { | |
| @each $selector in $sprite-selectors { | |
| @if sprite_has_selector($map, $sprite-name, $selector) { | |
| @if $selector == [something normal]{ | |
| &:#{$selector}, &.is-#{$selector}{ | |
| @include sprite-background-position($map, "#{$sprite-name}_#{$selector}"); | |
| } | |
| } | |
| @else { | |
| &.is-#{$selector}{ | |
| @include sprite-background-position($map, "#{$sprite-name}_#{$selector}"); | |
| } | |
| } | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment