stylesheets/singularitygs/helpers/_find.scss in singularitygs-1.0.5 vs stylesheets/singularitygs/helpers/_find.scss in singularitygs-1.0.6

- old
+ new

@@ -36,43 +36,43 @@ @if not ($mobile-first) { $context: $query-max; } - // Loop over each item in Context to find if any of the items pass. - @each $query-context in $context { - @if $query-context != false { - // If it's smallest than the smallest MQ, use the 1st grid - @if $query-context < $smallest { - @return nth($haystack, 1); + // Loop over each item in Context to find if any of the items pass. + @each $query-context in $context { + @if $query-context != false { + // If it's smallest than the smallest MQ, use the 1st grid + @if $query-context < $smallest { + @return nth($haystack, 1); + } + // If it's larger than or equal to the largest MQ, use the last grid + @else if $query-context >= $largest { + @return nth(nth($reverse-haystack, 1), 1); } - // If it's larger than or equal to the largest MQ, use the last grid - @else if $query-context >= $largest { - @return nth(nth($reverse-haystack, 1), 1); - } - // If it's in between the smallest and largest, go run a check. + // If it's in between the smallest and largest, go run a check. @else { - // Loop through each MQ. - @for $j from 1 through $rg-length { - $query: nth(nth($reverse-haystack, $j), 2); + // Loop through each MQ. + @for $j from 1 through $rg-length { + $query: nth(nth($reverse-haystack, $j), 2); - // If the MQ is greather than or equal to the the MQ in question, use it! (mobile first) - @if ($mobile-first) { - @if $query-context >= $query { - @return nth(nth($reverse-haystack, $j), 1); - } - } - // If the MQ is less than or equal to the the MQ in question, use it! (not mobile first) - @else { - @if $query-context <= $query { - @return nth(nth($reverse-haystack, $j), 1); - } - } + // If the MQ is greather than or equal to the the MQ in question, use it! (mobile first) + @if ($mobile-first) { + @if $query-context >= $query { + @return nth(nth($reverse-haystack, $j), 1); + } + } + // If the MQ is less than or equal to the the MQ in question, use it! (not mobile first) + @else { + @if $query-context <= $query { + @return nth(nth($reverse-haystack, $j), 1); + } + } } } } } - @return nth($haystack, 1); + @return nth($haystack, 1); } // All else fails, return the first grid @else { @return nth($haystack, 1); } \ No newline at end of file