From 8d111789012b6615caa2b95d2de5214e54097930 Mon Sep 17 00:00:00 2001 From: Matthew Tretter Date: Wed, 20 Mar 2013 16:28:28 -0400 Subject: [PATCH 1/3] Wrap math in parens The less 1.4 beta requires all math to be done inside parenthesis. --- stylesheets/less/grid.less | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/stylesheets/less/grid.less b/stylesheets/less/grid.less index d017266..7d5ea77 100644 --- a/stylesheets/less/grid.less +++ b/stylesheets/less/grid.less @@ -8,7 +8,7 @@ @columns: 12; // Utility variable — you should never need to modify this -@gridsystem-width: (@column-width*@columns) + (@gutter-width*@columns) * 1px; +@gridsystem-width: (((@column-width*@columns) + (@gutter-width*@columns)) * 1px); // Set @total-width to 100% for a fluid layout @total-width: @gridsystem-width; @@ -43,23 +43,23 @@ body { .row(@columns:@columns) { 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; + 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) { display: inline; float: left; - width: @total-width*((((@gutter-width+@column-width)*@x)-@gutter-width) / @gridsystem-width); - margin: 0 @total-width*((@gutter-width*.5)/@gridsystem-width); - // *width: @total-width*((((@gutter-width+@column-width)*@x)-@gutter-width) / @gridsystem-width)-@correction; - // *margin: 0 @total-width*((@gutter-width*.5)/@gridsystem-width)-@correction; + width: (@total-width*((((@gutter-width+@column-width)*@x)-@gutter-width) / @gridsystem-width)); + margin: 0 (@total-width*((@gutter-width*.5)/@gridsystem-width)); + // *width: (@total-width*((((@gutter-width+@column-width)*@x)-@gutter-width) / @gridsystem-width)-@correction); + // *margin: 0 (@total-width*((@gutter-width*.5)/@gridsystem-width)-@correction); } .push(@offset:1) { - margin-left: @total-width*(((@gutter-width+@column-width)*@offset) / @gridsystem-width) + @total-width*((@gutter-width*.5)/@gridsystem-width); + margin-left: (@total-width*(((@gutter-width+@column-width)*@offset) / @gridsystem-width) + @total-width*((@gutter-width*.5)/@gridsystem-width)); } .pull(@offset:1) { - margin-right: @total-width*(((@gutter-width+@column-width)*@offset) / @gridsystem-width) + @total-width*((@gutter-width*.5)/@gridsystem-width); -} \ No newline at end of file + margin-right: (@total-width*(((@gutter-width+@column-width)*@offset) / @gridsystem-width) + @total-width*((@gutter-width*.5)/@gridsystem-width)); +} From b32266d3e2b7d6c487336f34d0a8178a9d1bd959 Mon Sep 17 00:00:00 2001 From: Matthew Tretter Date: Wed, 20 Mar 2013 16:29:22 -0400 Subject: [PATCH 2/3] Remove mixed-unit math The less 1.4 beta disallows unit inconsistency in math operations. --- stylesheets/less/grid.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stylesheets/less/grid.less b/stylesheets/less/grid.less index 7d5ea77..d2b1bd2 100644 --- a/stylesheets/less/grid.less +++ b/stylesheets/less/grid.less @@ -8,7 +8,7 @@ @columns: 12; // Utility variable — you should never need to modify this -@gridsystem-width: (((@column-width*@columns) + (@gutter-width*@columns)) * 1px); +@gridsystem-width: (((@column-width*@columns) + (@gutter-width*@columns)) * 1); // Set @total-width to 100% for a fluid layout @total-width: @gridsystem-width; From 40132af0470e1c501c11d208f30ff35c3cba97bc Mon Sep 17 00:00:00 2001 From: Matthew Tretter Date: Wed, 24 Apr 2013 17:01:46 -0400 Subject: [PATCH 3/3] Remove multiplication by 1 --- stylesheets/less/grid.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stylesheets/less/grid.less b/stylesheets/less/grid.less index d2b1bd2..028c593 100644 --- a/stylesheets/less/grid.less +++ b/stylesheets/less/grid.less @@ -8,7 +8,7 @@ @columns: 12; // Utility variable — you should never need to modify this -@gridsystem-width: (((@column-width*@columns) + (@gutter-width*@columns)) * 1); +@gridsystem-width: (@column-width*@columns + @gutter-width*@columns); // Set @total-width to 100% for a fluid layout @total-width: @gridsystem-width;