Install Fixed Chute in Bourbon Neat

By default, Neat uses percentages as the right edge of each span-columns element, but I hope for a fixed t21 trough, regardless of the width of the outer-container .

enter image description here

+6
source share
1 answer

One solution would be to create your own mixin that redefines the neat gutter.

 @mixin col-with-gutter( $cols, $gutter ){ @include span-columns($cols); margin-right: $gutter; } .half{ @include col-with-gutter(2, 30px); } 

Obviously, you will have to do additional customization if you need to use some other span-columns functions. I suggest you look at _ span-columns.scss source to find out what might work best for you.

Honestly, I think there is a reason this functionality is not built-in. In most situations, setting the gutter to 30px will be detrimental to responsive design (since the total width of the columns will most likely not add up to 100%).

You may have a legitimate reason requiring exactly 30px , but if you are not sure if you need the exact value, it might be worth revising.

+4
source

Source: https://habr.com/ru/post/982715/


All Articles