|
81 | 81 | each(keys(@breakpoints), #(@breakpoint) {
|
82 | 82 | @infix: breakpoint-infix(@breakpoint, @breakpoints);
|
83 | 83 |
|
84 |
| - #for-1-to-columns(@i: 1) when (@i <= @columns) { |
| 84 | + each(range(@columns), #(@i) { |
85 | 85 | .col@{infix}-@{i} {
|
86 | 86 | &:extend(.grid-column);
|
87 | 87 | }
|
88 |
| - |
89 |
| - #for-1-to-columns((@i + 1)); |
90 |
| - } #for-1-to-columns(); |
| 88 | + }); |
91 | 89 |
|
92 | 90 | .col@{infix},
|
93 | 91 | .col@{infix}-auto {
|
|
107 | 105 | max-width: none; // Reset earlier grid tiers
|
108 | 106 | }
|
109 | 107 |
|
110 |
| - #for-1-to-columns-col(@ii: 1) when (@ii <= @columns) { |
111 |
| - .col@{infix}-@{ii} { |
112 |
| - #make-col(@ii, @columns); |
| 108 | + each(range(@columns), #(@i) { |
| 109 | + .col@{infix}-@{i} { |
| 110 | + #make-col(@i, @columns); |
113 | 111 | }
|
114 |
| - |
115 |
| - #for-1-to-columns-col((@ii + 1)); |
116 |
| - } #for-1-to-columns-col(); |
| 112 | + }); |
117 | 113 |
|
118 | 114 | .order@{infix}-first { order: -1; }
|
119 | 115 |
|
120 | 116 | .order@{infix}-last { order: (@columns + 1); }
|
121 | 117 |
|
122 |
| - #for-1-to-columns-order(@ii: 0) when (@ii <= @columns) { |
123 |
| - .order@{infix}-@{ii} { order: @ii; } |
| 118 | + each(range(0, @columns), #(@i) { |
| 119 | + .order@{infix}-@{i} { order: @i; } |
| 120 | + }); |
124 | 121 |
|
125 |
| - #for-1-to-columns-order((@ii + 1)); |
126 |
| - } #for-1-to-columns-order(); |
127 |
| - |
128 |
| - // `@ii < @columns` because offsetting by the width of an entire row isn't possible |
129 |
| - #for-1-to-columns-offset(@ii: 0) when (@ii < @columns) { |
130 |
| - & when not (@ii = 0), |
131 |
| - (@ii = 0) and not (@infix = ~"") { |
132 |
| - .offset@{infix}-@{ii} { |
133 |
| - #make-col-offset(@ii, @columns); |
| 122 | + // `@columns - 1` because offsetting by the width of an entire row isn't possible |
| 123 | + each(range(0, (@columns - 1)), #(@i) { |
| 124 | + & when not (@i = 0), |
| 125 | + (@i = 0) and not (@infix = ~"") { |
| 126 | + .offset@{infix}-@{i} { |
| 127 | + #make-col-offset(@i, @columns); |
134 | 128 | }
|
135 | 129 | }
|
136 |
| - |
137 |
| - #for-1-to-columns-offset((@ii + 1)); |
138 |
| - } #for-1-to-columns-offset(); |
| 130 | + }); |
139 | 131 | });
|
140 | 132 | });
|
141 | 133 | }
|
0 commit comments