Skip to content

Commit

Permalink
still support precise point by number
Browse files Browse the repository at this point in the history
  • Loading branch information
kermage committed Jun 14, 2019
1 parent 6ced117 commit 05237b8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions utilities/_breakpoints.scss
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,7 @@ $breakpoints: (
@mixin break-only( $query ) {
$value: break-only( $query );

@if type-of( $value ) != list {
@media screen and ( min-width: $value ) and ( max-width: $value ) { @content; }
} @else if nth( $value, 1 ) != null and nth( $value, 2 ) != null {
@if nth( $value, 1 ) != null and nth( $value, 2 ) != null {
@media screen and ( min-width: nth( $value, 1 ) ) and ( max-width: nth( $value, 2 ) ) { @content; }
} @else if nth( $value, 1 ) == null {
@media screen and ( max-width: $value ) { @content; }
Expand Down Expand Up @@ -142,6 +140,8 @@ $breakpoints: (
$value: set-nth( $value, 1, $query );
$query: if( $index < length( $names ), nth( $names, $index + 1 ), null );
$value: append( $value, $query );
} @else if type-of( $query ) == 'number' {
$value: $query $query;
}

@if map-has-key( $breakpoints, nth( $value, 1 ) ) {
Expand Down

0 comments on commit 05237b8

Please sign in to comment.