aboutsummaryrefslogtreecommitdiff
path: root/_sass/minimal-mistakes/vendor/breakpoint/parsers/double/_default-pair.scss
blob: f88432ccdb29b37eab35dbefec93216a5332dc2f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
@function breakpoint-parse-default-pair($first, $second) {
  $default: breakpoint-get('default pair');
  $min: '';
  $max: '';

  // Sort into min and max
  $min: min($first, $second);
  $max: max($first, $second);

  // Set Context
  $context-setter: private-breakpoint-set-context(min-#{$default}, $min);
  $context-setter: private-breakpoint-set-context(max-#{$default}, $max);

  // Make them EMs if need be
  @if (breakpoint-get('to ems') == true) {
    $min: breakpoint-to-base-em($min);
    $max: breakpoint-to-base-em($max);
  }

  @return '(min-#{$default}: #{$min}) and (max-#{$default}: #{$max})';
}