Skip to content

Commit

Permalink
support named points for between sizes
Browse files Browse the repository at this point in the history
  • Loading branch information
kermage committed Jun 14, 2019
1 parent 30c3ebb commit 6ced117
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions utilities/_breakpoints.scss
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,17 @@ $breakpoints: (
$index: index( $names, $query );

@if map-has-key( $breakpoints, $query ) {
$value: set-nth( $value, 1, break-from( $query ) );
$value: set-nth( $value, 1, $query );
$query: if( $index < length( $names ), nth( $names, $index + 1 ), null );
$value: append( $value, break-until( $query ) );
$value: append( $value, $query );
}

@if map-has-key( $breakpoints, nth( $value, 1 ) ) {
$value: set-nth( $value, 1, break-from( nth( $value, 1 ) ) );
}

@if map-has-key( $breakpoints, nth( $value, 2 ) ) {
$value: set-nth( $value, 2, break-until( nth( $value, 2 ) ) );
}

@return $value;
Expand Down

0 comments on commit 6ced117

Please sign in to comment.