Created
February 10, 2014 21:39
-
-
Save heyMP/8924727 to your computer and use it in GitHub Desktop.
Child Margin Fixer. This will remove the margin on the first child and last child elements within a selector. Mainly used for lists.
This file contains 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 child-margin-fixer { | |
& > *:first-child, | |
& > *:last-child, | |
& > *:last-child > *:last-child, | |
& > *:last-child > *:last-child > *:last-child { | |
margin: 0; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I need to change this a bit. Plan on adding a 'selector' and 'depth' variable