Last active
December 11, 2015 16:09
-
-
Save VinSpee/4625913 to your computer and use it in GitHub Desktop.
fill a gutter with padding from your el instead of margin.
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
// 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) |
@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
If you would rather keep the border-box model, you can add
width: space($cols);
You might also want to add an option for$context
to be passed in so nested elements can use it. We may have to consider something like this in Susy Next. Care to file an issue?