@mixin mq(
    $from: null,
    $until: null
) {
    $media: "only screen";

    $sourceFrom: if(map-has-key($__tweakpoints, $from), $__tweakpoints, $__breakpoints);
    $sourceUntil: if(map-has-key($__tweakpoints, $until), $__tweakpoints, $__breakpoints);

    @if map-has-key($sourceFrom, $from) {
        $from: " and (min-width: #{map-get($sourceFrom, $from)})";
    }
    
    @if map-has-key($sourceUntil, $until) {
        $until: " and (max-width: #{map-get($sourceUntil, $until) - 1})";
    }

    @if $from or $until {
        @media #{$media}#{$from}#{$until} {
            @content;
        }    
    }
}