/* ============================================================================
   @UTILITIES -> FLOAT
   ========================================================================= */


/**
 * Simply make an element floated or remove it.
 *
 * All the utilities (available as silent placeholder selectors also):
 *
   .u-float-left
   .u-float-right
   .u-float-none
 *
 * @demo
 * http://s.codepen.io/chris-pearce/full/ByYeQd
 */


/**
 * Settings.
 */

/**
 * Apply at these breakpoints (turned off by default).
 */

$u-float-apply-at-breakpoints:             $default-breakpoints !default;

// From the above breakpoints choose which utilities you wish to apply it too
$u-float-apply-at-breakpoints-for-left:    false !default;

$u-float-apply-at-breakpoints-for-right:   false !default;

$u-float-apply-at-breakpoints-for-none:    false !default;


/**
 * Left.
 */

%u-float-left,
.u-float-left {
  float: left !important;
}

@if $u-float-apply-at-breakpoints-for-left {
  @include generate-at-breakpoints('.u-float-left',
    $u-float-apply-at-breakpoints) {
    float: left !important;
  }
}


/**
 * Right.
 */

%u-float-right,
.u-float-right {
  float: right !important;
}

@if $u-float-apply-at-breakpoints-for-right {
  @include generate-at-breakpoints('.u-float-right',
    $u-float-apply-at-breakpoints) {
    float: right !important;
  }
}


/**
 * None.
 */

%u-float-none,
.u-float-none {
  float: none !important;
}

@if $u-float-apply-at-breakpoints-for-none {
  @include generate-at-breakpoints('.u-float-none',
    $u-float-apply-at-breakpoints) {
    float: none !important;
  }
}