|
147 | 147 | @if(type-of($nth) == list) { |
148 | 148 | $compiled-list: append($compiled-list, media-condition($nth), comma ); |
149 | 149 | } @else { |
150 | | - $condition: unquote(quote(nth($conditions,$i))); |
| 150 | + $condition: unquote(quote($nth)); |
151 | 151 | // Basic String Conditions |
152 | 152 | @if map-has-key($condition-map, $condition) { |
153 | 153 | $pre: map-get($condition-map,$condition); |
|
161 | 161 | } |
162 | 162 | } @else { |
163 | 163 | $operator: get-expression-operator($condition); |
164 | | - $value: get-expression-value($condition,$operator); |
165 | | - @if map-has-key($grid-breakpoints, $value) { |
166 | | - // Breakpoint Based Conditions |
167 | | - $compiled-list: append($compiled-list, get-breakpoint-string($value, $operator), comma); |
| 164 | + @if $operator != unquote("") { |
| 165 | + $value: get-expression-value($condition,$operator); |
| 166 | + @if map-has-key($grid-breakpoints, $value) { |
| 167 | + // Breakpoint Based Conditions |
| 168 | + $compiled-list: append($compiled-list, get-breakpoint-string($value, $operator), comma); |
| 169 | + } @else { |
| 170 | + // Width Based Condition |
| 171 | + $compiled-list: append($compiled-list, get-width-string($operator,$value,$value), comma ); |
| 172 | + } |
168 | 173 | } @else { |
169 | | - // Width Based Condition |
170 | | - $compiled-list: append($compiled-list, get-width-string($operator,$value,$value), comma ); |
| 174 | + $compiled-list: append($compiled-list, $condition, comma ); |
171 | 175 | } |
172 | 176 | } |
173 | 177 | } |
|
180 | 184 | $sep: ''; |
181 | 185 |
|
182 | 186 | @if $conditions-string != '' { |
183 | | - $sep: unquote(", "); |
| 187 | + @if $last != "and" { |
| 188 | + $sep: unquote(", "); |
| 189 | + } @else { |
| 190 | + $sep: unquote(" "); |
| 191 | + } |
184 | 192 | } |
185 | 193 |
|
186 | 194 | $conditions-string: $conditions-string + $sep + $this; |
|
0 commit comments