Skip to content

Instantly share code, notes, and snippets.

@graygilmore
Last active February 4, 2021 16:49
Show Gist options
  • Save graygilmore/5862373 to your computer and use it in GitHub Desktop.
Save graygilmore/5862373 to your computer and use it in GitHub Desktop.
Mixin for removing top and bottom margins on first and last child.
@mixin someNameThatMakesSense () {
> *:first-child {
margin-top: 0;
}
> *:last-child {
margin-bottom: 0;
}
}
.wrap {
@include someNameThatMakesSense;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment