Skip to content

Commit

Permalink
add @total-width as parameter to .column and .row
Browse files Browse the repository at this point in the history
To allow mixed pixel and percentage layouts.
  • Loading branch information
joshuarrrr committed Jun 10, 2014
1 parent 22e0e79 commit 98f42dc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions stylesheets/less/grid.less
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/////////////////
// Semantic.gs // for LESS: http://lesscss.org/
// Modified version of Semantic.gs // for LESS: http://lesscss.org/
/////////////////

// Defaults which you can freely override
Expand Down Expand Up @@ -41,15 +41,15 @@ body {
.clearfix;
}

.row(@columns:@columns) {
.row(@columns:@columns,@total-width:@total-width) {
display: block;
width: @total-width*((@gutter-width + @gridsystem-width)/@gridsystem-width);
margin: 0 @total-width*(((@gutter-width*.5)/@gridsystem-width)*-1);
// *width: @total-width*((@gutter-width + @gridsystem-width)/@gridsystem-width)-@correction;
// *margin: 0 @total-width*(((@gutter-width*.5)/@gridsystem-width)*-1)-@correction;
.clearfix;
}
.column(@x,@columns:@columns) {
.column(@x,@columns:@columns,@total-width:@total-width) {
display: inline;
float: left;
width: @total-width*((((@gutter-width+@column-width)*@x)-@gutter-width) / @gridsystem-width);
Expand Down

0 comments on commit 98f42dc

Please sign in to comment.