Skip to content

Instantly share code, notes, and snippets.

@VinSpee
Last active December 11, 2015 16:09
Show Gist options
  • Save VinSpee/4625913 to your computer and use it in GitHub Desktop.
Save VinSpee/4625913 to your computer and use it in GitHub Desktop.
fill a gutter with padding from your el instead of margin.
// requires that you're using the susy grid system (you should be anyway.)
=span-columns-and-fill-gutter($cols, $context: false)
@if ($context != false)
width: space($cols, $context)
@else
width: space($cols)
margin-right: 0
padding-right: gutter()
// In use:
.my-el
+span-columns-and-fill-gutter(1)
// Or, with context:
.my-el
+span-columns-and-fill-gutter(1, 12)
@VinSpee
Copy link
Author

VinSpee commented Jan 27, 2013

@ericam I'm always fighting gist on tabs when I use the web interface.

I'll update this mixin and file the issue! Thanks for the feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment