Skip to content

Instantly share code, notes, and snippets.

@maxxscho
Created June 19, 2015 09:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maxxscho/96a279853aec0a411262 to your computer and use it in GitHub Desktop.
Save maxxscho/96a279853aec0a411262 to your computer and use it in GitHub Desktop.
Adds a parent selector to your selector
@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