Skip to content

Instantly share code, notes, and snippets.

@benvisser
Last active August 29, 2015 13:57
Show Gist options
  • Save benvisser/9842091 to your computer and use it in GitHub Desktop.
Save benvisser/9842091 to your computer and use it in GitHub Desktop.
//section padding mixin
//you'll need breakpoint and to set your breakpoint variables as well
//usage @include pad(60, 60);
@mixin pad($topValue: 140, $bottomValue: 140) {
padding-top: $topValue / 2 + px;
padding-bottom: $bottomValue / 2 + px;
@include breakpoint($small) {
padding-top: $topValue / 1.5 + px;
padding-bottom: $bottomValue / 1.5 + px;
}
@include breakpoint($large) {
padding-top: $topValue + px;
padding-bottom: $bottomValue + px;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment