Skip to content

Instantly share code, notes, and snippets.

@heyMP
Created March 14, 2014 11:09
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 heyMP/9545823 to your computer and use it in GitHub Desktop.
Save heyMP/9545823 to your computer and use it in GitHub Desktop.
Child Margin Fixer
@mixin child-margin-fixer($selector:'*') {
& > #{$selector}:first-child,
& > #{$selector}:last-child,
& > #{$selector}:last-child > #{$selector}:last-child,
& > #{$selector}:last-child > #{$selector}:last-child > #{$selector}:last-child {
margin: 0;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment