Skip to content

Commit

Permalink
(less) add parens around arithmetic in recursive mixin calls to compl…
Browse files Browse the repository at this point in the history
…y with LESS strictMath

<3 @seven-phases-max for helping to confirm & debug this
X-Ref: less/less.js#1725
  • Loading branch information
cvrebert committed Dec 10, 2013
1 parent bbf54e5 commit cd2693b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions mixins.less
Original file line number Diff line number Diff line change
Expand Up @@ -729,11 +729,11 @@
// Common styles for all sizes of grid columns, widths 1-12
.col(@index) when (@index = 1) { // initial
@item: ~".col-xs-@{index}, .col-sm-@{index}, .col-md-@{index}, .col-lg-@{index}";
.col(@index + 1, @item);
.col((@index + 1), @item);
}
.col(@index, @list) when (@index =< @grid-columns) { // general; "=<" isn't a typo
@item: ~".col-xs-@{index}, .col-sm-@{index}, .col-md-@{index}, .col-lg-@{index}";
.col(@index + 1, ~"@{list}, @{item}");
.col((@index + 1), ~"@{list}, @{item}");
}
.col(@index, @list) when (@index > @grid-columns) { // terminal
@{list} {
Expand All @@ -751,11 +751,11 @@
.make-grid-columns-float(@class) {
.col(@index) when (@index = 1) { // initial
@item: ~".col-@{class}-@{index}";
.col(@index + 1, @item);
.col((@index + 1), @item);
}
.col(@index, @list) when (@index =< @grid-columns) { // general
@item: ~".col-@{class}-@{index}";
.col(@index + 1, ~"@{list}, @{item}");
.col((@index + 1), ~"@{list}, @{item}");
}
.col(@index, @list) when (@index > @grid-columns) { // terminal
@{list} {
Expand Down Expand Up @@ -790,7 +790,7 @@
.make-grid(@index, @class, @type) when (@index >= 0) {
.calc-grid(@index, @class, @type);
// next iteration
.make-grid(@index - 1, @class, @type);
.make-grid((@index - 1), @class, @type);
}


Expand Down

0 comments on commit cd2693b

Please sign in to comment.