twitter/bootstrap — Issue #2008: More settings for grid
Author: leon
Created: 2012-02-16 09:08:50+00:00
State: open

The grid needs more options to cater for different scenarios.

a nogutter option would be great
a pixel fix could be a good thing when using borders (may not be necessary).

Psuedo code with fix parameter and NoGutter

@columnWidth: 48px;
@gutterWidth: 24px;

.row() {
margin-left: -@gutterWidth;
.clearfix();
}

.gridWidth(@columnSpan: 1, @fix: 0px) {
width: (@columnWidth * @columnSpan) + (@gutterWidth * (@columnSpan - 1) + @fix);
}
.gridColumn(@columnSpan: 1, @fix: 0px) {
display: inline;
float: left;
margin-left: @gutterWidth;
.gridWidth(@columnSpan, @fix);
}
.gridColumnNoGutter(@columnSpan: 1, @fix: 0px) {
display: inline;
float: left;
.gridWidth(@columnSpan, @gutterWidth + @fix);
}

in these special cases you could create the grid cell yourself by applying `.gridColumnnoGutter(5, -2px)` (grid column with 1px border) to your cell instead of using the built in span1-12 classes.

I'd just like to get the discussion going on how to make the gridsystem to be even more awesome!