Search code examples
bourbonneat

1px margin on span-columns with Bourbon Neat


I want to do this:

@include span-columns(4 of 12, block-collapse);

...but I want a 1 pixel margin on the right side of column 1 and 2, how do I do that?


Solution

  • Unfortunately there isnt really a good way to do that. However you do have a couple of options:

    1. use padding
    2. use border-right: 1px solid transparent;
    3. copy the output css and then add 1 px to it using calc() and add that to the scss after the mixin

    example

    .card {
      @include span-columns(4 of 12, block-collapse);
      margin-left: calc(??% + 1px)
    }