@mixin media($media) {

    @if $media == xsmall {
        @media only screen and (max-width:$xsmall) {
            @content;
        }
    }

    @else if $media == small {
        @media only screen and (max-width:$small) {
            @content;
        }
    }

    @else if $media == medium {
        @media only screen and (min-width:$medium) {
            @content;
        }
    }

    @else if $media == medium-end {
        @media only screen and (min-width:$small+1) and (max-width:$large) {
            @content;
        }
    }

    @else if $media == large {
        @media only screen and (min-width:$large) {
            @content;
        }
    }

    @else if $media == xlarge {
        @media only screen and (min-width:$xlarge) {
            @content;
        }
    }

}
