Created
June 19, 2015 09:46
-
-
Save maxxscho/96a279853aec0a411262 to your computer and use it in GitHub Desktop.
Adds a parent selector to your selector
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
@mixin parent($selector: null) { | |
@if $selector { | |
#{$selector} & { | |
@content; | |
} | |
} | |
} | |
@mixin and_parent($selector: null) { | |
@if $selector { | |
#{$selector} & { | |
@content; | |
} | |
@content; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment