stylesheets/singularitygs/helpers/_find.scss in singularitygs-1.6.2 vs stylesheets/singularitygs/helpers/_find.scss in singularitygs-1.7.0
- old
+ new
@@ -36,29 +36,29 @@
@if type-of($haystack) != 'map' {
@warn "DEPRECATION: In order to remove global variable naming conflicts, Singularity's settings have been moved into the single `$singularity` variable. Please refer to our documentation (https://github.com/Team-Sass/Singularity/wiki) on how to update your settings. In the next version of Singularity, this warning will be removed. #{nth($haystack, 1)} has been returned.";
@return nth($haystack, 1);
}
- // Grab Breakpoint Context
- @if not function-exists(breakpoint-get-context) {
- @warn "Responsive contexts require Breakpoint (https://github.com/Team-Sass/breakpoint). Please ensure that Breakpoint is imported and available for Singularity to use. First item used.";
- @return map-get($haystack, -1px);
- }
- // Get Breakpoint Contexts
- $Query-Min: breakpoint-get-context('min-width');
- $Query-Max: breakpoint-get-context('max-width');
+ @if $Length > 1 {
+ // Grab Breakpoint Context
+ @if not function-exists(breakpoint-get-context) {
+ @warn "Responsive contexts require Breakpoint (https://github.com/Team-Sass/breakpoint). Please ensure that Breakpoint is imported and available for Singularity to use. First item used.";
+ @return map-get($haystack, -1px);
+ }
+ // Get Breakpoint Contexts
+ $Query-Min: breakpoint-get-context('min-width');
+ $Query-Max: breakpoint-get-context('max-width');
- @if length($Query-Min) == 1 {
- $Query-Min: nth($Query-Min, 1);
- }
- @else if length($Query-Min) > 1 {
- @warn "Responsive contexts are not available for `or` queries as which query to use is ambiguous. Please only use single context queries. Default context is used.";
- @return map-get($haystack, -1px);
- }
+ @if length($Query-Min) == 1 {
+ $Query-Min: nth($Query-Min, 1);
+ }
+ @else if length($Query-Min) > 1 {
+ @warn "Responsive contexts are not available for `or` queries as which query to use is ambiguous. Please only use single context queries. Default context is used.";
+ @return map-get($haystack, -1px);
+ }
- @if $Length > 1 {
@if length($Query-Max) == 1 {
$Query-Max: nth($Query-Max, 1);
}
@else if length($Query-Max) > 1 {
@warn "Responsive contexts are not available for `or` queries as which query to use is ambiguous. Please only use single context queries. Default context is used.";
@@ -131,6 +131,6 @@
// All else fails, return the first item
@else {
$RETURN: map-get($haystack, -1px);
@return $RETURN;
}
-}
\ No newline at end of file
+}