$breakPoints: (
    xxs: 0,
    // Phones - 768px and below
    xs: 768px,
    // Tablet portrait - 768px - 1023px
    sm: 1024px,
    // Tablet landscape - 1024px - 1279px
    md: 1280px,
    // Small laptop - 1280px - 1439px
    lg: 1440px,
    // Large laptop - 1440px - 1919px
    xl: 1920px,
    // Desktop - 1920px - 2559px
    xxl: 2560px,
    // Big Desktop - 2560px and up

) !default;

// Breakpoint viewport sizes and media queries.
// Breakpoints are defined as a map of (name: minimum width), order from small to large:
// The map defined in the `$breakPoints` global variable is used as the `$breakpoints` argument by default.

// Name of the next breakpoint, or null for the last breakpoint.
@function breakpoint-next($name, $breakpoints: $breakPoints, $breakpoint-names: map-keys($breakpoints)) {
    $n: index($breakpoint-names, $name);

    @if not $n {
        @error "breakpoint `#{$name}` not found in `#{$breakpoints}`";
    }

    @return if($n < length($breakpoint-names), nth($breakpoint-names, $n + 1), null);
}

// Minimum breakpoint width. Null for the smallest (first) breakpoint.
//
//    >> breakpoint-min(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))
//    576px
@function breakpoint-min($name, $breakpoints: $breakPoints) {
    $min: map-get($breakpoints, $name);
    @return if($min !=0, $min, null);
}

// Maximum breakpoint width.
// The maximum value is reduced by 0.02px to work around the limitations of
@function breakpoint-max($name, $breakpoints: $breakPoints) {
    $max: map-get($breakpoints, $name);
    @return if($max and $max > 0, $max - .02, null);
}

// Returns a blank string if smallest breakpoint, otherwise returns the name with a dash in front.
//    >> breakpoint-infix(xs, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))
//    ""  (Returns a blank string)
//    >> breakpoint-infix(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))
//    "-sm"
@function breakpoint-infix($name, $breakpoints: $breakPoints) {
    @return if(breakpoint-min($name, $breakpoints)==null, "", "-#{$name}");
}

// Media of at least the minimum breakpoint width. No query for the smallest breakpoint.
// Makes the @content apply to the given breakpoint and wider.
@mixin media-breakpoint-min($name, $breakpoints: $breakPoints) {
    $min: breakpoint-min($name, $breakpoints);
    @if $min {
        @media (min-width: $min) {
            @content;
        }
    }
    @else {
        @content;
    }
}

// Media of at most the maximum breakpoint width. No query for the largest breakpoint.
// Makes the @content apply to the given breakpoint and narrower.
@mixin media-breakpoint-max($name, $breakpoints: $breakPoints) {
    $max: breakpoint-max($name, $breakpoints);
    @if $max {
        @media (max-width: $max) {
            @content;
        }
    }
    @else {
        @content;
    }
}

// Media that spans multiple breakpoint widths.
// Makes the @content apply between the min and max breakpoints
@mixin media-breakpoint-between($lower, $upper, $breakpoints: $breakPoints) {
    $min: breakpoint-min($lower, $breakpoints);
    $max: breakpoint-max($upper, $breakpoints);
    @if $min !=null and $max !=null {
        @media (min-width: $min) and (max-width: $max) {
            @content;
        }
    }
    @else if $max==null {
        @include media-breakpoint-min($lower, $breakpoints) {
            @content;
        }
    }
    @else if $min==null {
        @include media-breakpoint-max($upper, $breakpoints) {
            @content;
        }
    }
}

// Media between the breakpoint's minimum and maximum widths.
// No minimum for the smallest breakpoint, and no maximum for the largest one.
// Makes the @content apply only to the given breakpoint, not viewports any wider or narrower.
@mixin media-breakpoint-only($name, $breakpoints: $breakPoints) {
    $min: breakpoint-min($name, $breakpoints);
    $next: breakpoint-next($name, $breakpoints);
    $max: breakpoint-max($next);
    @if $min !=null and $max !=null {
        @media (min-width: $min) and (max-width: $max) {
            @content;
        }
    }
    @else if $max==null {
        @include media-breakpoint-min($name, $breakpoints) {
            @content;
        }
    }
    @else if $min==null {
        @include media-breakpoint-max($next, $breakpoints) {
            @content;
        }
    }
}
