0

I'm finding myself frequently having to negate gutters with margin-left: 0; margin-right: 0;. I tried setting gutters in a custom layout to 0

$my_layout: (gutters: 0);
.my_class {
  @include with-layout($my_layout) {
    ...
  }
}

but this does not set the gutter width to 0, it just tells susy not set gutters at all.

How do you set gutters to 0 in a susy layout (instead of just setting them to null)?

hal
  • 4,845
  • 7
  • 34
  • 57
  • This [works fine for me](http://sassmeister.com/gist/6fbbc3e2e571fff9f3a5). I can't recreate the error. – Miriam Suzanne Dec 30 '14 at 03:24
  • Hmmm, alright, I'll look into it further and see if I can find what's causing it; – hal Dec 30 '14 at 05:02
  • Could it have anything to do with `@include with-layout` being called within another mixin? – hal Dec 30 '14 at 05:14
  • It might depend on the mixin. Can you narrow it down to a failing demo? – Miriam Suzanne Dec 30 '14 at 06:03
  • So the issue is that `gutters: 0` doesn't remove gutters it just tells susy not to add them. So if gutters are already set from a previous breakpoint then they will remain regardless of your layout settings. http://sassmeister.com/gist/6fbbc3e2e571fff9f3a5 – hal Dec 30 '14 at 13:31
  • oops, that link just leads back to the sassmeister demo you made. I thought I was linking to my edits. I edited the question to be more specific. – hal Dec 30 '14 at 13:38
  • So is there no way to set gutters to zero rather just `null`? – hal Dec 31 '14 at 21:46

1 Answers1

0

This seems to work:

$my-layout: (
  gutter-override: 0%,
);

gutter-override is generally for overriding gutters on-the-fly, but Susy allows it to be set globally as well. Currently Susy ignores gutter output of 0, but seems to allow gutter output of 0% (or 0 with any other unit).

I'd be willing to consider adding more clear null vs. 0 functionality, if you want to file an issue on github.

Miriam Suzanne
  • 13,632
  • 2
  • 38
  • 43