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