﻿//==
// Creates float classes for each breakpoint.
//##
@mixin push($bp, $direction) {
    // XXS doesn't have a min value.
    @if $bp == xxs {

        .push-#{$bp} {
            float: $direction;
        }

        @include bp-max($bp) {
            .push-#{$bp}-only {
                float: $direction;
            }
        }
    }
    @else {

        @include bp-min($bp) {

            .push-#{$bp} {
                float: $direction;
            }
            // Large doesn't need an "only" since it operates on min width.
            @if $bp != l {
                @include bp-max($bp) {
                    .push-#{$bp}-only {
                        float: $direction;
                    }
                }
            }
        }
    }
}

@mixin pull($bp, $direction) {
    // XS doesn't have a min value.
    @if $bp == xs {

        .pull-#{$bp} {
            float: $direction;
        }

        @include bp-max($bp) {
            .pull-#{$bp}-only {
                float: $direction;
            }
        }
    }
    @else {

        @include bp-min($bp) {

            .pull-#{$bp} {
                float: $direction;
            }
            // Large doesn't need an "only" since it operates on min width.
            @if $bp != l {
                @include bp-max($bp) {
                    .pull-#{$bp}-only {
                        float: $direction;
                    }
                }
            }
        }
    }
}
