Skip to content

Commit

Permalink
Fix unneeded Breakpoint warning
Browse files Browse the repository at this point in the history
Resolves #203
  • Loading branch information
Sam Richard committed Feb 21, 2016
1 parent 3ab71ef commit 0d520dd
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions stylesheets/singularitygs/helpers/_find.scss
Original file line number Diff line number Diff line change
Expand Up @@ -38,25 +38,25 @@
@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);
}
Expand Down Expand Up @@ -133,4 +133,4 @@
$RETURN: map-get($haystack, -1px);
@return $RETURN;
}
}
}

0 comments on commit 0d520dd

Please sign in to comment.