//= Compass mixins
//
// A partial implementation of the Ruby list functions from Compass:
// https://github.com/Compass/compass/blob/stable/lib/compass/sass_extensions/functions/lists.rb
//


// compact is part of libsass

@function -compass-nth($list, $place) {
  // Yep, Sass-lists are 1-indexed.
  @if $place == "first" {
    $place: 1;
  }
  @if $place == "last" {
    $place: length($list);
  }
  @return nth($list, $place);
}

// compass_list can't be implemented in sass script

@function -compass-space-list($item1, $item2:null, $item3:null, $item4:null, $item5:null, $item6:null, $item7:null, $item8:null, $item9:null) {
  $items: ();
  // Support for polymorphism.
  @if type-of($item1) == 'list' {
    // Passing a single array of properties.
    $items: $item1;
  } @else {
    $items: $item1 $item2 $item3 $item4 $item5 $item6 $item7 $item8 $item9;
  }

  $full: first-value-of($items);

  @for $i from 2 through length($items) {
    $item: nth($items, $i);
    @if $item != null {
      $full: $full $item;
    }
  }

  @return $full;
}

@function -compass-list-size($list) {
  @return length($list);
}

@function -compass-slice($list, $start, $end: false) {
  @if $end == false {
    $end: length($list);
  }
  $full: nth($list, $start);
  @for $i from $start + 1 through $end {
    $full: $full, nth($list, $i);
  }
  @return $full;
}

@function reject($list, $reject1, $reject2:null, $reject3:null, $reject4:null, $reject5:null, $reject6:null, $reject7:null, $reject8:null, $reject9:null) {
  $rejects: $reject1, $reject2, $reject3, $reject4, $reject5, $reject6, $reject7, $reject8, $reject9;

  $full: false;
  @each $item in $list {
    @if index($rejects, $item) {}
    @else {
      @if $full {
        $full: $full, $item;
      }
      @else {
        $full: $item;
      }
    }
  }
  @return $full;
}

@function first-value-of($list) {
  @return nth($list, 1);
}

@function compact($vars...) {
  $separator: list-separator($vars);
  $list: ();
  @each $var in $vars {
      @if $var {
          $list: append($list, $var, $separator);
      }
  }
  @return $list;
}

// 
// A partial implementation of the Ruby cross browser support functions from Compass:
// https://github.com/Compass/compass/blob/stable/lib/compass/sass_extensions/functions/cross_browser_support.rb
// 

@function prefixed($prefix, $property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
  $properties: $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9;
  $prefixed: false;
  @each $item in $properties {
    @if type-of($item) == 'string' {
      $prefixed: $prefixed or str-index($item, 'url') != 1 and str-index($item, 'rgb') != 1 and str-index($item, '#') != 1;
    } @elseif type-of($item) == 'color' {
    } @elseif $item != null {
      $prefixed: true;
    }
  }
  @return $prefixed;
}

@function prefix($prefix, $property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
  $properties: "";

  // Support for polymorphism.
  @if type-of($property1) == 'list' {
    // Passing a single array of properties.
    $properties: $property1;
  } @else {
    // Passing multiple properties.
    $properties: $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9;
  }

  $props: false;
  @each $item in $properties {
    @if $item == null {}
    @else {
      @if prefixed($prefix, $item) {
        $item: #{$prefix}-#{$item};
      }
      @if $props {
        $props: $props, $item;
      }
      @else {
        $props: $item;
      }
    }
  }
  @return $props;
}

@function -svg($property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
  @return prefix('-svg', $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9);
}

@function -owg($property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
  @return prefix('-owg', $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9);
}

@function -webkit($property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
  @return prefix('-webkit', $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9);
}

@function -moz($property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
  @return prefix('-moz', $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9);
}

@function -o($property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
  @return prefix('-o', $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9);
}

@function -pie($property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
  @return prefix('-pie', $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9);
}

// 
// A partial implementation of the Ruby gradient support functions from Compass:
// https://github.com/Compass/compass/blob/v0.12.2/lib/compass/sass_extensions/functions/gradient_support.rb
// 

@function color-stops($item1, $item2:null, $item3:null, $item4:null, $item5:null, $item6:null, $item7:null, $item8:null, $item9:null) {
  $items: $item2, $item3, $item4, $item5, $item6, $item7, $item8, $item9;
  $full: $item1;
  @each $item in $items {
    @if $item != null {
      $full: $full, $item;
    }    
  }
  @return $full;
}
// 
// A partial implementation of the Ruby constants functions from Compass:
// https://github.com/Compass/compass/blob/stable/lib/compass/sass_extensions/functions/constants.rb
// 

@function opposite-position($from) {
    @if ($from == top) {
        @return bottom;
    } @else if ($from == bottom) {
        @return top;
    } @else if ($from == left) {
        @return right;
    } @else if ($from == right) {
        @return left;
    } @else if ($from == center) {
        @return center;
    }
}

// 
// A partial implementation of the Ruby display functions from Compass:
// https://github.com/Compass/compass/blob/stable/core/lib/compass/core/sass_extensions/functions/display.rb
// 

@function elements-of-type($type){
    @if ($type == block){
        @return address, article, aside, blockquote, center, dir, div, dd, details, dl, dt, fieldset, figcaption, figure, form, footer, frameset, h1, h2, h3, h4, h5, h6, hr, header, hgroup, isindex, main, menu, nav, noframes, noscript, ol, p, pre, section, summary, ul;
    } @else if ($type == inline){
        @return a, abbr, acronym, audio, b, basefont, bdo, big, br, canvas, cite, code, command, datalist, dfn, em, embed, font, i, img, input, keygen, kbd, label, mark, meter, output, progress, q, rp, rt, ruby, s, samp, select, small, span, strike, strong, sub, sup, textarea, time, tt, u, var, video, wbr;
    } @else if ($type == inline-block){
        @return img;
    } @else if ($type == table){
        @return table;
    } @else if ($type == list-item){
        @return li;
    } @else if ($type == table-row-group){
        @return tbody;
    } @else if ($type == table-header-group){
        @return thead;
    } @else if ($type == table-footer-group){
        @return tfoot;
    } @else if ($type == table-row){
        @return tr;
    } @else if ($type == table-cell){
        @return th, td;
    } @else if ($type == html5-block){
        @return article, aside, details, figcaption, figure, footer, header, hgroup, main, menu, nav, section, summary;
    } @else if ($type == html5-inline){
        @return audio, canvas, command, datalist, embed, keygen, mark, meter, output, progress, rp, rt, ruby, time, video, wbr;
    } @else if ($type == html5){
        @return article, aside, audio, canvas, command, datalist, details, embed, figcaption, figure, footer, header, hgroup, keygen, main, mark, menu, meter, nav, output, progress, rp, rt, ruby, section, summary, time, video, wbr;
    } @else if ($type == text-input){
        @return input, textarea;
    }
}

// 
// A partial implementation of the Ruby colors functions from Compass:
// https://github.com/Compass/compass/blob/stable/core/lib/compass/core/sass_extensions/functions/colors.rb
//

// a genericized version of lighten/darken so that negative values can be used.
@function adjust-lightness($color, $amount) {
    @return adjust-color($color, $lightness: $amount);
}

// Scales a color's lightness by some percentage.
// If the amount is negative, the color is scaled darker, if positive, it is scaled lighter.
// This will never return a pure light or dark color unless the amount is 100%.
@function scale-lightness($color, $amount) {
    @return scale-color($color, $lightness: $amount);
}

// a genericized version of saturate/desaturate so that negative values can be used.
@function adjust-saturation($color, $amount) {
    @return adjust-color($color, $saturation: $amount);
}

// Scales a color's saturation by some percentage.
// If the amount is negative, the color is desaturated, if positive, it is saturated.
// This will never return a pure saturated or desaturated color unless the amount is 100%.
@function scale-saturation($color, $amount) {
    @return scale-color($color, $saturation: $amount);
}

@function shade($color, $percentage) {
    @return mix(#000000, $color, $percentage);
}

@function tint($color, $percentage) {
    @return mix(#ffffff, $color, $percentage);
}


$contrasted-dark-default:   #000 !default;
$contrasted-light-default:  #fff !default;
$contrasted-lightness-threshold: 30% !default;

// Returns the `$light` color when the `$color` is dark
// and the `$dark` color when the `$color` is light.
// The `$threshold` is a percent between `0%` and `100%` and it determines
// when the lightness of `$color` changes from "dark" to "light".
@function contrast-color(
  $color,
  $dark: $contrasted-dark-default,
  $light: $contrasted-light-default,
  $threshold: $contrasted-lightness-threshold
) {
  @return if(lightness($color) < $threshold, $light, $dark)
}

// Sets the specified background color and calculates a dark or light contrasted text color.
// The arguments are passed through to the [contrast-color function](#function-contrast-color).
@mixin contrasted(
  $background-color,
  $dark: $contrasted-dark-default,
  $light: $contrasted-light-default,
  $threshold: $contrasted-lightness-threshold
) {
  background-color: $background-color;
  color: contrast-color($background-color, $dark, $light, $threshold);
}
// This module has moved.
// Based on [Eric Meyer's reset 2.0](http://meyerweb.com/eric/tools/css/reset/index.html)
// Global reset rules.
// For more specific resets, use the reset mixins provided below
@mixin global-reset {
  html, body, div, span, applet, object, iframe,
  h1, h2, h3, h4, h5, h6, p, blockquote, pre,
  a, abbr, acronym, address, big, cite, code,
  del, dfn, em, img, ins, kbd, q, s, samp,
  small, strike, strong, sub, sup, tt, var,
  b, u, i, center,
  dl, dt, dd, ol, ul, li,
  fieldset, form, label, legend,
  table, caption, tbody, tfoot, thead, tr, th, td,
  article, aside, canvas, details, embed, 
  figure, figcaption, footer, header, hgroup, 
  menu, nav, output, ruby, section, summary,
  time, mark, audio, video {
    @include reset-box-model;
    @include reset-font; }
  // Unlike Eric's original reset, we reset the html element to be compatible
  // with the vertical rhythm mixins.
  html {
    @include reset-body; }
  ol, ul {
    @include reset-list-style; }
  table {
    @include reset-table; }
  caption, th, td {
    @include reset-table-cell; }
  q, blockquote {
    @include reset-quotation; }
  a img {
    @include reset-image-anchor-border; }
  @include reset-html5; }

// Reset all elements within some selector scope. To reset the selector itself,
// mixin the appropriate reset mixin for that element type as well. This could be
// useful if you want to style a part of your page in a dramatically different way.
@mixin nested-reset {
  div, span, applet, object, iframe,
  h1, h2, h3, h4, h5, h6, p, blockquote, pre,
  a, abbr, acronym, address, big, cite, code,
  del, dfn, em, img, ins, kbd, q, s, samp,
  small, strike, strong, sub, sup, tt, var,
  b, u, i, center,
  dl, dt, dd, ol, ul, li,
  fieldset, form, label, legend,
  table, caption, tbody, tfoot, thead, tr, th, td,
  article, aside, canvas, details, embed, 
  figure, figcaption, footer, header, hgroup, 
  menu, nav, output, ruby, section, summary,
  time, mark, audio, video {
    @include reset-box-model;
    @include reset-font; }
  table {
    @include reset-table; }
  caption, th, td {
    @include reset-table-cell; }
  q, blockquote {
    @include reset-quotation; }
  a img {
    @include reset-image-anchor-border; } }

// Reset the box model measurements.
@mixin reset-box-model {
  margin: 0;
  padding: 0;
  border: 0; }

// Reset the font and vertical alignment.
@mixin reset-font {
  font: inherit;
  font-size: 100%;
  vertical-align: baseline; }

// Resets the outline when focus.
// For accessibility you need to apply some styling in its place.
@mixin reset-focus {
  outline: 0; }

// Reset a body element.
@mixin reset-body {
  line-height: 1; }

// Reset the list style of an element.
@mixin reset-list-style {
  list-style: none; }

// Reset a table
@mixin reset-table {
  border-collapse: collapse;
  border-spacing: 0; }

// Reset a table cell (`th`, `td`)
@mixin reset-table-cell {
  text-align: left;
  font-weight: normal;
  vertical-align: middle; }

// Reset a quotation (`q`, `blockquote`)
@mixin reset-quotation {
  quotes: none;
  &:before, &:after {
    content: ""; 
    content: none; } }

// Resets the border.
@mixin reset-image-anchor-border {
  border: none; }

// Unrecognized elements are displayed inline.
// This reset provides a basic reset for block html5 elements
// so they are rendered correctly in browsers that don't recognize them
// and reset in browsers that have default styles for them.
@mixin reset-html5 {
  #{elements-of-type(html5-block)} {
    display: block; } }

// Resets the display of inline and block elements to their default display
// according to their tag type. Elements that have a default display that varies across
// versions of html or browser are not handled here, but this covers the 90% use case.
// Usage Example:
//
//     // Turn off the display for both of these classes
//     .unregistered-only, .registered-only
//       display: none
//     // Now turn only one of them back on depending on some other context.
//     body.registered
//       +reset-display(".registered-only")
//     body.unregistered
//       +reset-display(".unregistered-only")
@mixin reset-display($selector: "", $important: false) {
  #{append-selector(elements-of-type("inline"), $selector)} {
    @if $important {
      display: inline !important; }
    @else {
      display: inline; } }
  #{append-selector(elements-of-type("block"), $selector)} {
    @if $important {
      display: block !important; }
    @else {
      display: block; } } }

// @doc off
// Extends the bottom of the element to enclose any floats it contains.
// @doc on

// Usually compass hacks apply to both ie6 & 7 -- set this to false to disable support for both.
$legacy-support-for-ie: true !default;

// Setting this to false will result in smaller output, but no support for ie6 hacks
$legacy-support-for-ie6: $legacy-support-for-ie !default;

// Setting this to false will result in smaller output, but no support for ie7 hacks
$legacy-support-for-ie7: $legacy-support-for-ie !default;

// Setting this to false will result in smaller output, but no support for legacy ie8 hacks
$legacy-support-for-ie8: $legacy-support-for-ie !default;

// @private
// The user can simply set $legacy-support-for-ie and 6, 7, and 8 will be set accordingly,
// But in case the user set each of those explicitly, we need to sync the value of
// this combined variable.
$legacy-support-for-ie: $legacy-support-for-ie6 or $legacy-support-for-ie7 or $legacy-support-for-ie8;

// Whether to output legacy support for mozilla.
// Usually this means hacks to support Firefox 3.6 or earlier.
$legacy-support-for-mozilla: true;

// Support for mozilla in experimental css3 properties (-moz).
$experimental-support-for-mozilla      : true !default;
// Support for webkit in experimental css3 properties (-webkit).
$experimental-support-for-webkit       : true !default;
// Support for webkit's original (non-standard) gradient syntax.
$support-for-original-webkit-gradients : true !default;
// Support for opera in experimental css3 properties (-o).
$experimental-support-for-opera        : true !default;
// Support for microsoft in experimental css3 properties (-ms).
$experimental-support-for-microsoft    : true !default;
// Support for khtml in experimental css3 properties (-khtml).
$experimental-support-for-khtml        : false !default;
// Support for svg in experimental css3 properties.
// Setting this to true might add significant size to your
// generated stylesheets.
$experimental-support-for-svg          : false !default;
// Support for CSS PIE in experimental css3 properties (-pie).
$experimental-support-for-pie          : false !default;

// The `zoom` approach generates less CSS but does not validate.
// Set this to `block` to use the display-property to hack the
// element to gain layout.
$default-has-layout-approach: zoom !default;

// This mixin causes an element matching the selector
// to gain the "hasLayout" property in internet explorer.
// More information on [hasLayout](http://reference.sitepoint.com/css/haslayout).
@mixin has-layout($approach: $default-has-layout-approach) {
  @if $legacy-support-for-ie {
    @if $approach == zoom {
      @include has-layout-zoom;
    } @else if $approach == block {
      @include has-layout-block;
    } @else {
      @warn "Unknown has-layout approach: #{$approach}";
      @include has-layout-zoom;
    }
  }
}

@mixin has-layout-zoom {
  @if $legacy-support-for-ie6 or $legacy-support-for-ie7 {
    *zoom: 1;
  }
}

@mixin has-layout-block {
  @if $legacy-support-for-ie {
    // This makes ie6 get layout
    display: inline-block;
    // and this puts it back to block
    & { display: block; }
  }
}

// A hack to supply IE6 (and below) with a different property value.
// [Read more](http://www.cssportal.com/css-hacks/#in_css-important).
@mixin bang-hack($property, $value, $ie6-value) {
  @if $legacy-support-for-ie6 {
    #{$property}: #{$value} !important;
    #{$property}: #{$ie6-value};
  }
}

// This basic method is preferred for the usual case, when positioned
// content will not show outside the bounds of the container.
//
// Recommendations include using this in conjunction with a width.
// Credit: [quirksmode.org](http://www.quirksmode.org/blog/archives/2005/03/clearing_floats.html)
@mixin clearfix {
  overflow: hidden;
  @include has-layout;
}

// This older method from Position Is Everything called
// [Easy Clearing](http://www.positioniseverything.net/easyclearing.html)
// has the advantage of allowing positioned elements to hang
// outside the bounds of the container at the expense of more tricky CSS.
@mixin legacy-pie-clearfix {
  &:after {
    content    : "\0020";
    display    : block;
    height     : 0;
    clear      : both;
    overflow   : hidden;
    visibility : hidden;
  }
  @include has-layout;
}

// This is an updated version of the PIE clearfix method that reduces the amount of CSS output.
// If you need to support Firefox before 3.5 you need to use `legacy-pie-clearfix` instead.
//
// Adapted from: [A new micro clearfix hack](http://nicolasgallagher.com/micro-clearfix-hack/)
@mixin pie-clearfix {
  &:after {
    content: "";
    display: table;
    clear: both;
  }
  @include has-layout;
}

// Implementation of float:left with fix for the
// [double-margin bug in IE5/6](http://www.positioniseverything.net/explorer/doubled-margin.html)
@mixin float-left {
  @include float(left); }

// Implementation of float:right with fix for the
// [double-margin bug in IE5/6](http://www.positioniseverything.net/explorer/doubled-margin.html)
@mixin float-right {
  @include float(right); }

// Direction independent float mixin that fixes the
// [double-margin bug in IE5/6](http://www.positioniseverything.net/explorer/doubled-margin.html)
@mixin float($side: left) {
  display: inline;
  float: unquote($side); }

// Resets floated elements back to their default of `float: none` and defaults
// to `display: block` unless you pass `inline` as an argument
//
// Usage Example:
//
//     body.homepage
//       #footer li
//         +float-left
//     body.signup
//       #footer li
//         +reset-float
@mixin reset-float($display: block) {
  float: none;
  display: $display; }
// Emits styles for a tag cloud
@mixin tag-cloud($base-size: 1em) {
  font-size: $base-size;
  line-height: 1.2 * $base-size;
  .xxs, .xs, .s, .l, .xl, .xxl {
    line-height: 1.2 * $base-size; }
  .xxs {
    font-size: $base-size / 2; }
  .xs {
    font-size: 2 * $base-size / 3; }
  .s {
    font-size: 3 * $base-size / 4; }
  .l {
    font-size: 4 * $base-size / 3; }
  .xl {
    font-size: 3 * $base-size / 2; }
  .xxl {
    font-size: 2 * $base-size; } }

// Usually compass hacks apply to both ie6 & 7 -- set this to false to disable support for both.
$legacy-support-for-ie: true !default;

// Setting this to false will result in smaller output, but no support for ie6 hacks
$legacy-support-for-ie6: $legacy-support-for-ie !default;

// Setting this to false will result in smaller output, but no support for ie7 hacks
$legacy-support-for-ie7: $legacy-support-for-ie !default;

// Setting this to false will result in smaller output, but no support for legacy ie8 hacks
$legacy-support-for-ie8: $legacy-support-for-ie !default;

// @private
// The user can simply set $legacy-support-for-ie and 6, 7, and 8 will be set accordingly,
// But in case the user set each of those explicitly, we need to sync the value of
// this combined variable.
$legacy-support-for-ie: $legacy-support-for-ie6 or $legacy-support-for-ie7 or $legacy-support-for-ie8;

// Whether to output legacy support for mozilla.
// Usually this means hacks to support Firefox 3.6 or earlier.
$legacy-support-for-mozilla: true;

// Support for mozilla in experimental css3 properties (-moz).
$experimental-support-for-mozilla      : true !default;
// Support for webkit in experimental css3 properties (-webkit).
$experimental-support-for-webkit       : true !default;
// Support for webkit's original (non-standard) gradient syntax.
$support-for-original-webkit-gradients : true !default;
// Support for opera in experimental css3 properties (-o).
$experimental-support-for-opera        : true !default;
// Support for microsoft in experimental css3 properties (-ms).
$experimental-support-for-microsoft    : true !default;
// Support for khtml in experimental css3 properties (-khtml).
$experimental-support-for-khtml        : false !default;
// Support for svg in experimental css3 properties.
// Setting this to true might add significant size to your
// generated stylesheets.
$experimental-support-for-svg          : false !default;
// Support for CSS PIE in experimental css3 properties (-pie).
$experimental-support-for-pie          : false !default;

// The `zoom` approach generates less CSS but does not validate.
// Set this to `block` to use the display-property to hack the
// element to gain layout.
$default-has-layout-approach: zoom !default;

// This mixin causes an element matching the selector
// to gain the "hasLayout" property in internet explorer.
// More information on [hasLayout](http://reference.sitepoint.com/css/haslayout).
@mixin has-layout($approach: $default-has-layout-approach) {
  @if $legacy-support-for-ie {
    @if $approach == zoom {
      @include has-layout-zoom;
    } @else if $approach == block {
      @include has-layout-block;
    } @else {
      @warn "Unknown has-layout approach: #{$approach}";
      @include has-layout-zoom;
    }
  }
}

@mixin has-layout-zoom {
  @if $legacy-support-for-ie6 or $legacy-support-for-ie7 {
    *zoom: 1;
  }
}

@mixin has-layout-block {
  @if $legacy-support-for-ie {
    // This makes ie6 get layout
    display: inline-block;
    // and this puts it back to block
    & { display: block; }
  }
}

// A hack to supply IE6 (and below) with a different property value.
// [Read more](http://www.cssportal.com/css-hacks/#in_css-important).
@mixin bang-hack($property, $value, $ie6-value) {
  @if $legacy-support-for-ie6 {
    #{$property}: #{$value} !important;
    #{$property}: #{$ie6-value};
  }
}

// Usually compass hacks apply to both ie6 & 7 -- set this to false to disable support for both.
$legacy-support-for-ie: true !default;

// Setting this to false will result in smaller output, but no support for ie6 hacks
$legacy-support-for-ie6: $legacy-support-for-ie !default;

// Setting this to false will result in smaller output, but no support for ie7 hacks
$legacy-support-for-ie7: $legacy-support-for-ie !default;

// Setting this to false will result in smaller output, but no support for legacy ie8 hacks
$legacy-support-for-ie8: $legacy-support-for-ie !default;

// @private
// The user can simply set $legacy-support-for-ie and 6, 7, and 8 will be set accordingly,
// But in case the user set each of those explicitly, we need to sync the value of
// this combined variable.
$legacy-support-for-ie: $legacy-support-for-ie6 or $legacy-support-for-ie7 or $legacy-support-for-ie8;

// Whether to output legacy support for mozilla.
// Usually this means hacks to support Firefox 3.6 or earlier.
$legacy-support-for-mozilla: true;

// Support for mozilla in experimental css3 properties (-moz).
$experimental-support-for-mozilla      : true !default;
// Support for webkit in experimental css3 properties (-webkit).
$experimental-support-for-webkit       : true !default;
// Support for webkit's original (non-standard) gradient syntax.
$support-for-original-webkit-gradients : true !default;
// Support for opera in experimental css3 properties (-o).
$experimental-support-for-opera        : true !default;
// Support for microsoft in experimental css3 properties (-ms).
$experimental-support-for-microsoft    : true !default;
// Support for khtml in experimental css3 properties (-khtml).
$experimental-support-for-khtml        : false !default;
// Support for svg in experimental css3 properties.
// Setting this to true might add significant size to your
// generated stylesheets.
$experimental-support-for-svg          : false !default;
// Support for CSS PIE in experimental css3 properties (-pie).
$experimental-support-for-pie          : false !default;

// The `zoom` approach generates less CSS but does not validate.
// Set this to `block` to use the display-property to hack the
// element to gain layout.
$default-has-layout-approach: zoom !default;

// This mixin causes an element matching the selector
// to gain the "hasLayout" property in internet explorer.
// More information on [hasLayout](http://reference.sitepoint.com/css/haslayout).
@mixin has-layout($approach: $default-has-layout-approach) {
  @if $legacy-support-for-ie {
    @if $approach == zoom {
      @include has-layout-zoom;
    } @else if $approach == block {
      @include has-layout-block;
    } @else {
      @warn "Unknown has-layout approach: #{$approach}";
      @include has-layout-zoom;
    }
  }
}

@mixin has-layout-zoom {
  @if $legacy-support-for-ie6 or $legacy-support-for-ie7 {
    *zoom: 1;
  }
}

@mixin has-layout-block {
  @if $legacy-support-for-ie {
    // This makes ie6 get layout
    display: inline-block;
    // and this puts it back to block
    & { display: block; }
  }
}

// A hack to supply IE6 (and below) with a different property value.
// [Read more](http://www.cssportal.com/css-hacks/#in_css-important).
@mixin bang-hack($property, $value, $ie6-value) {
  @if $legacy-support-for-ie6 {
    #{$property}: #{$value} !important;
    #{$property}: #{$ie6-value};
  }
}

//**
// Cross browser min-height mixin.
@mixin min-height($value) {
  @include hacked-minimum(height, $value); }

//**
// Cross browser min-width mixin.
@mixin min-width($value) {
  @include hacked-minimum(width, $value); }

// @private This mixin is not meant to be used directly.
@mixin hacked-minimum($property, $value) {
  min-#{$property}: $value;
  @include bang-hack($property, auto, $value); }

// Determines those states for which you want to enable magic sprite selectors
$sprite-selectors: hover, target, active !default;

// Set the width and height of an element to the original
// dimensions of an image before it was included in the sprite.
@mixin sprite-dimensions($map, $sprite) {
  height: image-height(sprite-file($map, $sprite));
  width: image-width(sprite-file($map, $sprite));
}

// Set the background position of the given sprite `$map` to display the
// sprite of the given `$sprite` name. You can move the image relative to its
// natural position by passing `$offset-x` and `$offset-y`.
@mixin sprite-background-position($map, $sprite, $offset-x: 0, $offset-y: 0) {
  background-position: sprite-position($map, $sprite, $offset-x, $offset-y);  
}


// Determines if you want to include magic selectors in your sprites
$disable-magic-sprite-selectors:false !default;

// Include the position and (optionally) dimensions of this `$sprite`
// in the given sprite `$map`. The sprite url should come from either a base
// class or you can specify the `sprite-url` explicitly like this:
//
//     background: $map no-repeat;
@mixin sprite($map, $sprite, $dimensions: false, $offset-x: 0, $offset-y: 0) {
  @include sprite-background-position($map, $sprite, $offset-x, $offset-y);
  @if $dimensions {
    @include sprite-dimensions($map, $sprite);
  }
  @if not($disable-magic-sprite-selectors) {
    @include sprite-selectors($map, $sprite, $sprite, $offset-x, $offset-y);
  }
}

// Include the selectors for the `$sprite` given the `$map` and the 
// `$full-sprite-name`
// @private
@mixin sprite-selectors($map, $sprite-name, $full-sprite-name, $offset-x: 0, $offset-y: 0) {
  @each $selector in $sprite-selectors {
    @if sprite_has_selector($map, $sprite-name, $selector) {
      &:#{$selector}, &.#{$full-sprite-name}_#{$selector}, &.#{$full-sprite-name}-#{$selector} {
          @include sprite-background-position($map, "#{$sprite-name}_#{$selector}", $offset-x, $offset-y);
      }
    }
  }
}

// Generates a class for each space separated name in `$sprite-names`.
// The class will be of the form .<map-name>-<sprite-name>.
//
// If a base class is provided, then each class will extend it.
//
// If `$dimensions` is `true`, the sprite dimensions will specified.
@mixin sprites($map, $sprite-names, $base-class: false, $dimensions: false, $prefix: sprite-map-name($map), $offset-x: 0, $offset-y: 0) {
  @each $sprite-name in $sprite-names {
    @if sprite_does_not_have_parent($map, $sprite-name) {
      $full-sprite-name: "#{$prefix}-#{$sprite-name}";
      .#{$full-sprite-name} {
        @if $base-class { @extend #{$base-class}; }
        @include sprite($map, $sprite-name, $dimensions, $offset-x, $offset-y);
      }
    }
  }
}
// @doc off
// Example 1:
//
//     a.twitter
//       +sprite-img("icons-32.png", 1)
//     a.facebook
//       +sprite-img("icons-32png", 2)
//
// Example 2:
//
//     a
//       +sprite-background("icons-32.png")
//       a.twitter
//         +sprite-column(1)
//       a.facebook
//         +sprite-row(2)
// @doc on

$sprite-default-size: 32px !default;

$sprite-default-margin: 0px !default;

$sprite-image-default-width: $sprite-default-size !default;

$sprite-image-default-height: $sprite-default-size !default;

// Sets all the rules for a sprite from a given sprite image to show just one of the sprites.
// To reduce duplication use a sprite-bg mixin for common properties and a sprite-select mixin for positioning.
@mixin sprite-img($img, $col, $row: 1, $width: $sprite-image-default-width, $height: $sprite-image-default-height, $margin: $sprite-default-margin) {
  @include sprite-background($img, $width, $height);
  @include sprite-position($col, $row, $width, $height, $margin); 
}

// Sets rules common for all sprites, assumes you want a square, but allows a rectangular region.
@mixin sprite-background($img, $width: $sprite-default-size, $height: $width) {
  @include sprite-background-rectangle($img, $width, $height); 
}

// Sets rules common for all sprites, assumes a rectangular region.
@mixin sprite-background-rectangle($img, $width: $sprite-image-default-width, $height: $sprite-image-default-height) {
  background: image-url($img) no-repeat;
  width: $width;
  height: $height;
  overflow: hidden; 
}

// Allows horizontal sprite positioning optimized for a single row of sprites.
@mixin sprite-column($col, $width: $sprite-image-default-width, $margin: $sprite-default-margin) {
  @include sprite-position($col, 1, $width, 0px, $margin); 
}

// Allows vertical sprite positioning optimized for a single column of sprites.
@mixin sprite-row($row, $height: $sprite-image-default-height, $margin: $sprite-default-margin) {
  @include sprite-position(1, $row, 0px, $height, $margin); 
}

// Allows vertical and horizontal sprite positioning from a grid of equal dimensioned sprites.
@mixin sprite-position($col, $row: 1, $width: $sprite-image-default-width, $height: $sprite-image-default-height, $margin: $sprite-default-margin) {
  $x: ($col - 1) * -$width - ($col - 1) * $margin;
  $y: ($row - 1) * -$height - ($row - 1) * $margin;
  background-position: $x $y; 
}



// Similar to 'sprite-replace-text-with-dimensions' but does not autmaticly set the demensions
@mixin sprite-replace-text ($map, $sprite, $dimensions: false, $offset-x: 0, $offset-y: 0) {    
  @include hide-text;
  @include sprite($map, $sprite, $dimensions, $offset-x, $offset-y);
  background-image: $map;
  background-repeat: no-repeat;
}

// Similar to 'replace-text-with-dimensions' but with sprites
// To use, create your sprite and then pass it in the `$map` param
// The name of the image in the sprite folder should be `$img-name`
@mixin sprite-replace-text-with-dimensions ($map, $sprite, $offset-x: 0, $offset-y: 0){    
  @include sprite-replace-text ($map, $sprite, true, $offset-x, $offset-y);
}
@mixin alternating-rows-and-columns($even-row-color, $odd-row-color, $dark-intersection, $header-color: white, $footer-color: white) {
  th {
    background-color: $header-color;
    &.even, &:nth-child(2n) {
      background-color: $header-color - $dark-intersection; } }
  tr {
    &.odd, &:nth-child(2n+1) {
      td {
       background-color: $odd-row-color;
       &.even, &:nth-child(2n) {
         background-color: $odd-row-color - $dark-intersection; } } }
    }
  tr.even {
    td {
      background-color: $even-row-color;
      &.even, &:nth-child(2n) {
        background-color: $even-row-color - $dark-intersection; } } }
  tfoot {
    th, td {
      background-color: $footer-color;
      &.even, &:nth-child(2n) {
        background-color: $footer-color - $dark-intersection; } } } }

@mixin outer-table-borders($width: 2px, $color: black) {
  border: $width solid $color;
  thead {
    th {
      border-bottom: $width solid $color; } }
  tfoot {
    th, td {
      border-top: $width solid $color; } }
  th {
    &:first-child {
      border-right: $width solid $color; } } }

@mixin inner-table-borders($width: 2px, $color: black) {
  th, td {
    border: {
      right: $width solid $color;
      bottom: $width solid $color;
      left-width: 0px;
      top-width: 0px; };
    &:last-child,
    &.last {
      border-right-width: 0px; } }

// IE8 ignores rules that are included on the same line as :last-child
// see http://www.richardscarrott.co.uk/posts/view/ie8-last-child-bug for details

  tbody, tfoot {
    tr:last-child {
      th, td {
        border-bottom-width: 0px; } }
    tr.last {
      th, td {
        border-bottom-width: 0px; } } } }

@mixin table-scaffolding {
  th {
    text-align: center;
    font-weight: bold; }
  td,
  th {
    padding: 2px;
    &.numeric {
      text-align: right; } } }

// deprecated
// a link that only has an underline when you hover over it
@mixin hover-link {
  text-decoration: none;
  &:hover {
    text-decoration: underline; } }

// Set all the colors for a link with one mixin call.
// Order of arguments is:
//
// 1. normal
// 2. hover
// 3. active
// 4. visited
// 5. focus
//
// Those states not specified will inherit.
// Mixin to an anchor link like so:
//     a
//       +link-colors(#00c, #0cc, #c0c, #ccc, #cc0)

@mixin link-colors($normal, $hover: false, $active: false, $visited: false, $focus: false) {
  color: $normal;
  @if $visited {
    &:visited {
      color: $visited; } }
  @if $focus {
    &:focus {
      color: $focus; } }
  @if $hover {
    &:hover {
      color: $hover; } }
  @if $active {
    &:active {
      color: $active; } } }

// A link that looks and acts like the text it is contained within
@mixin unstyled-link {
  color: inherit;
  text-decoration: inherit;
  cursor: inherit;
  &:active, &:focus {
    outline: none; } }

// Horizontal list layout module.
//
// Easy mode using simple descendant li selectors:
//
//   ul.nav
//     +horizontal-list
//
// Advanced mode:
// If you need to target the list items using a different selector then use
// +horizontal-list-container on your ul/ol and +horizontal-list-item on your li.
// This may help when working on layouts involving nested lists. For example:
//
//   ul.nav
//     +horizontal-list-container
//     > li
//       +horizontal-list-item

// Turn off the bullet for an element of a list
@mixin no-bullet {
  list-style-image : none;
  list-style-type  : none;
  margin-left      : 0;
}

// turns off the bullets for an entire list
@mixin no-bullets {
  list-style: none;
  li { @include no-bullet; }
}

// Make a list(ul/ol) have an image bullet.
//
// The mixin should be used like this for an icon that is 5x7:
//
//     ul.pretty
//       +pretty-bullets("my-icon.png", 5px, 7px)
//
// Additionally, if the image dimensions are not provided,
// The image dimensions will be extracted from the image itself.
//
//     ul.pretty
//       +pretty-bullets("my-icon.png")
//
@mixin pretty-bullets($bullet-icon, $width: image-width($bullet-icon), $height: image-height($bullet-icon), $line-height: 18px, $padding: 14px) {
  margin-left: 0;
  li {
    padding-left: $padding;
    background: image-url($bullet-icon) no-repeat ($padding - $width) / 2 ($line-height - $height) / 2;
    list-style-type: none;
  }
}

// @doc off
// Extends the bottom of the element to enclose any floats it contains.
// @doc on

// Usually compass hacks apply to both ie6 & 7 -- set this to false to disable support for both.
$legacy-support-for-ie: true !default;

// Setting this to false will result in smaller output, but no support for ie6 hacks
$legacy-support-for-ie6: $legacy-support-for-ie !default;

// Setting this to false will result in smaller output, but no support for ie7 hacks
$legacy-support-for-ie7: $legacy-support-for-ie !default;

// Setting this to false will result in smaller output, but no support for legacy ie8 hacks
$legacy-support-for-ie8: $legacy-support-for-ie !default;

// @private
// The user can simply set $legacy-support-for-ie and 6, 7, and 8 will be set accordingly,
// But in case the user set each of those explicitly, we need to sync the value of
// this combined variable.
$legacy-support-for-ie: $legacy-support-for-ie6 or $legacy-support-for-ie7 or $legacy-support-for-ie8;

// Whether to output legacy support for mozilla.
// Usually this means hacks to support Firefox 3.6 or earlier.
$legacy-support-for-mozilla: true;

// Support for mozilla in experimental css3 properties (-moz).
$experimental-support-for-mozilla      : true !default;
// Support for webkit in experimental css3 properties (-webkit).
$experimental-support-for-webkit       : true !default;
// Support for webkit's original (non-standard) gradient syntax.
$support-for-original-webkit-gradients : true !default;
// Support for opera in experimental css3 properties (-o).
$experimental-support-for-opera        : true !default;
// Support for microsoft in experimental css3 properties (-ms).
$experimental-support-for-microsoft    : true !default;
// Support for khtml in experimental css3 properties (-khtml).
$experimental-support-for-khtml        : false !default;
// Support for svg in experimental css3 properties.
// Setting this to true might add significant size to your
// generated stylesheets.
$experimental-support-for-svg          : false !default;
// Support for CSS PIE in experimental css3 properties (-pie).
$experimental-support-for-pie          : false !default;

// The `zoom` approach generates less CSS but does not validate.
// Set this to `block` to use the display-property to hack the
// element to gain layout.
$default-has-layout-approach: zoom !default;

// This mixin causes an element matching the selector
// to gain the "hasLayout" property in internet explorer.
// More information on [hasLayout](http://reference.sitepoint.com/css/haslayout).
@mixin has-layout($approach: $default-has-layout-approach) {
  @if $legacy-support-for-ie {
    @if $approach == zoom {
      @include has-layout-zoom;
    } @else if $approach == block {
      @include has-layout-block;
    } @else {
      @warn "Unknown has-layout approach: #{$approach}";
      @include has-layout-zoom;
    }
  }
}

@mixin has-layout-zoom {
  @if $legacy-support-for-ie6 or $legacy-support-for-ie7 {
    *zoom: 1;
  }
}

@mixin has-layout-block {
  @if $legacy-support-for-ie {
    // This makes ie6 get layout
    display: inline-block;
    // and this puts it back to block
    & { display: block; }
  }
}

// A hack to supply IE6 (and below) with a different property value.
// [Read more](http://www.cssportal.com/css-hacks/#in_css-important).
@mixin bang-hack($property, $value, $ie6-value) {
  @if $legacy-support-for-ie6 {
    #{$property}: #{$value} !important;
    #{$property}: #{$ie6-value};
  }
}

// This basic method is preferred for the usual case, when positioned
// content will not show outside the bounds of the container.
//
// Recommendations include using this in conjunction with a width.
// Credit: [quirksmode.org](http://www.quirksmode.org/blog/archives/2005/03/clearing_floats.html)
@mixin clearfix {
  overflow: hidden;
  @include has-layout;
}

// This older method from Position Is Everything called
// [Easy Clearing](http://www.positioniseverything.net/easyclearing.html)
// has the advantage of allowing positioned elements to hang
// outside the bounds of the container at the expense of more tricky CSS.
@mixin legacy-pie-clearfix {
  &:after {
    content    : "\0020";
    display    : block;
    height     : 0;
    clear      : both;
    overflow   : hidden;
    visibility : hidden;
  }
  @include has-layout;
}

// This is an updated version of the PIE clearfix method that reduces the amount of CSS output.
// If you need to support Firefox before 3.5 you need to use `legacy-pie-clearfix` instead.
//
// Adapted from: [A new micro clearfix hack](http://nicolasgallagher.com/micro-clearfix-hack/)
@mixin pie-clearfix {
  &:after {
    content: "";
    display: table;
    clear: both;
  }
  @include has-layout;
}

// This module has moved.
// Based on [Eric Meyer's reset 2.0](http://meyerweb.com/eric/tools/css/reset/index.html)
// Global reset rules.
// For more specific resets, use the reset mixins provided below
@mixin global-reset {
  html, body, div, span, applet, object, iframe,
  h1, h2, h3, h4, h5, h6, p, blockquote, pre,
  a, abbr, acronym, address, big, cite, code,
  del, dfn, em, img, ins, kbd, q, s, samp,
  small, strike, strong, sub, sup, tt, var,
  b, u, i, center,
  dl, dt, dd, ol, ul, li,
  fieldset, form, label, legend,
  table, caption, tbody, tfoot, thead, tr, th, td,
  article, aside, canvas, details, embed, 
  figure, figcaption, footer, header, hgroup, 
  menu, nav, output, ruby, section, summary,
  time, mark, audio, video {
    @include reset-box-model;
    @include reset-font; }
  // Unlike Eric's original reset, we reset the html element to be compatible
  // with the vertical rhythm mixins.
  html {
    @include reset-body; }
  ol, ul {
    @include reset-list-style; }
  table {
    @include reset-table; }
  caption, th, td {
    @include reset-table-cell; }
  q, blockquote {
    @include reset-quotation; }
  a img {
    @include reset-image-anchor-border; }
  @include reset-html5; }

// Reset all elements within some selector scope. To reset the selector itself,
// mixin the appropriate reset mixin for that element type as well. This could be
// useful if you want to style a part of your page in a dramatically different way.
@mixin nested-reset {
  div, span, applet, object, iframe,
  h1, h2, h3, h4, h5, h6, p, blockquote, pre,
  a, abbr, acronym, address, big, cite, code,
  del, dfn, em, img, ins, kbd, q, s, samp,
  small, strike, strong, sub, sup, tt, var,
  b, u, i, center,
  dl, dt, dd, ol, ul, li,
  fieldset, form, label, legend,
  table, caption, tbody, tfoot, thead, tr, th, td,
  article, aside, canvas, details, embed, 
  figure, figcaption, footer, header, hgroup, 
  menu, nav, output, ruby, section, summary,
  time, mark, audio, video {
    @include reset-box-model;
    @include reset-font; }
  table {
    @include reset-table; }
  caption, th, td {
    @include reset-table-cell; }
  q, blockquote {
    @include reset-quotation; }
  a img {
    @include reset-image-anchor-border; } }

// Reset the box model measurements.
@mixin reset-box-model {
  margin: 0;
  padding: 0;
  border: 0; }

// Reset the font and vertical alignment.
@mixin reset-font {
  font: inherit;
  font-size: 100%;
  vertical-align: baseline; }

// Resets the outline when focus.
// For accessibility you need to apply some styling in its place.
@mixin reset-focus {
  outline: 0; }

// Reset a body element.
@mixin reset-body {
  line-height: 1; }

// Reset the list style of an element.
@mixin reset-list-style {
  list-style: none; }

// Reset a table
@mixin reset-table {
  border-collapse: collapse;
  border-spacing: 0; }

// Reset a table cell (`th`, `td`)
@mixin reset-table-cell {
  text-align: left;
  font-weight: normal;
  vertical-align: middle; }

// Reset a quotation (`q`, `blockquote`)
@mixin reset-quotation {
  quotes: none;
  &:before, &:after {
    content: ""; 
    content: none; } }

// Resets the border.
@mixin reset-image-anchor-border {
  border: none; }

// Unrecognized elements are displayed inline.
// This reset provides a basic reset for block html5 elements
// so they are rendered correctly in browsers that don't recognize them
// and reset in browsers that have default styles for them.
@mixin reset-html5 {
  #{elements-of-type(html5-block)} {
    display: block; } }

// Resets the display of inline and block elements to their default display
// according to their tag type. Elements that have a default display that varies across
// versions of html or browser are not handled here, but this covers the 90% use case.
// Usage Example:
//
//     // Turn off the display for both of these classes
//     .unregistered-only, .registered-only
//       display: none
//     // Now turn only one of them back on depending on some other context.
//     body.registered
//       +reset-display(".registered-only")
//     body.unregistered
//       +reset-display(".unregistered-only")
@mixin reset-display($selector: "", $important: false) {
  #{append-selector(elements-of-type("inline"), $selector)} {
    @if $important {
      display: inline !important; }
    @else {
      display: inline; } }
  #{append-selector(elements-of-type("block"), $selector)} {
    @if $important {
      display: block !important; }
    @else {
      display: block; } } }

// Implementation of float:left with fix for the
// [double-margin bug in IE5/6](http://www.positioniseverything.net/explorer/doubled-margin.html)
@mixin float-left {
  @include float(left); }

// Implementation of float:right with fix for the
// [double-margin bug in IE5/6](http://www.positioniseverything.net/explorer/doubled-margin.html)
@mixin float-right {
  @include float(right); }

// Direction independent float mixin that fixes the
// [double-margin bug in IE5/6](http://www.positioniseverything.net/explorer/doubled-margin.html)
@mixin float($side: left) {
  display: inline;
  float: unquote($side); }

// Resets floated elements back to their default of `float: none` and defaults
// to `display: block` unless you pass `inline` as an argument
//
// Usage Example:
//
//     body.homepage
//       #footer li
//         +float-left
//     body.signup
//       #footer li
//         +reset-float
@mixin reset-float($display: block) {
  float: none;
  display: $display; }
// Can be mixed into any selector that target a ul or ol that is meant
// to have a horizontal layout. Used to implement +horizontal-list.
@mixin horizontal-list-container {
  @include reset-box-model;
  @include clearfix; }

// Can be mixed into any li selector that is meant to participate in a horizontal layout.
// Used to implement +horizontal-list.
//
// :last-child is not fully supported
// see http://www.quirksmode.org/css/contents.html#t29 for the support matrix
//
// IE8 ignores rules that are included on the same line as :last-child
// see http://www.richardscarrott.co.uk/posts/view/ie8-last-child-bug for details
//
// Setting `$padding` to `false` disables the padding between list elements
@mixin horizontal-list-item($padding: 4px, $direction: left) {
  @include no-bullet;
  white-space: nowrap;
  @include float($direction);
  @if $padding {
    padding: {
      left: $padding;
      right: $padding;
    }
    &:first-child, &.first { padding-#{$direction}: 0; }
    &:last-child { padding-#{opposite-position($direction)}: 0; }
    &.last { padding-#{opposite-position($direction)}: 0; }
  }
}

// A list(ol,ul) that is layed out such that the elements are floated left and won't wrap.
// This is not an inline list.
//
// Setting `$padding` to `false` disables the padding between list elements
@mixin horizontal-list($padding: 4px, $direction: left) {
  @include horizontal-list-container;
  li {
    @include horizontal-list-item($padding, $direction); } }

// makes a list inline.

@mixin inline-list {
  list-style-type: none;
  &, & li {
    margin: 0px;
    padding: 0px;
    display: inline;
  }
}

// makes an inline list delimited with the passed string.
// Defaults to making a comma-separated list.
//
// Please make note of the browser support issues before using this mixin:
//
// use of `content` and `:after` is not fully supported in all browsers.
// See quirksmode for the [support matrix](http://www.quirksmode.org/css/contents.html#t15)
//
// `:last-child` is not fully supported.
// see quirksmode for the [support matrix](http://www.quirksmode.org/css/contents.html#t29).
//
// IE8 ignores rules that are included on the same line as :last-child
// see http://www.richardscarrott.co.uk/posts/view/ie8-last-child-bug for details

@mixin delimited-list($separator: ", ") {
  @include inline-list;
  li {
    &:after { content: $separator; }
    &:last-child {
      &:after { content: ""; }
    }
    &.last {
      &:after { content: ""; }
    }
  }
}

// See [delimited-list](#mixin-delimited-list)
// @deprecated
@mixin comma-delimited-list {
  @warn "comma-delimited-list is deprecated. Please use delimited-list instead.";
  @include delimited-list;
}

// Inline-Block list layout module.
//
// Easy mode using simple descendant li selectors:
//
//     ul.nav {
//       @import inline-block-list;
//     }
//
// Advanced mode:
// If you need to target the list items using a different selector then use
// `@include inline-block-list-container` on your ul/ol and
// `@include inline-block-list-item` on your li. This may help when working
// on layouts involving nested lists. For example:
//
//     ul.nav {
//       @include inline-block-list-container;
//       > li {
//         @include inline-block-list-item;
//       }
//     }

// Turn off the bullet for an element of a list
@mixin no-bullet {
  list-style-image : none;
  list-style-type  : none;
  margin-left      : 0;
}

// turns off the bullets for an entire list
@mixin no-bullets {
  list-style: none;
  li { @include no-bullet; }
}

// Make a list(ul/ol) have an image bullet.
//
// The mixin should be used like this for an icon that is 5x7:
//
//     ul.pretty
//       +pretty-bullets("my-icon.png", 5px, 7px)
//
// Additionally, if the image dimensions are not provided,
// The image dimensions will be extracted from the image itself.
//
//     ul.pretty
//       +pretty-bullets("my-icon.png")
//
@mixin pretty-bullets($bullet-icon, $width: image-width($bullet-icon), $height: image-height($bullet-icon), $line-height: 18px, $padding: 14px) {
  margin-left: 0;
  li {
    padding-left: $padding;
    background: image-url($bullet-icon) no-repeat ($padding - $width) / 2 ($line-height - $height) / 2;
    list-style-type: none;
  }
}

// Horizontal list layout module.
//
// Easy mode using simple descendant li selectors:
//
//   ul.nav
//     +horizontal-list
//
// Advanced mode:
// If you need to target the list items using a different selector then use
// +horizontal-list-container on your ul/ol and +horizontal-list-item on your li.
// This may help when working on layouts involving nested lists. For example:
//
//   ul.nav
//     +horizontal-list-container
//     > li
//       +horizontal-list-item

// Turn off the bullet for an element of a list
@mixin no-bullet {
  list-style-image : none;
  list-style-type  : none;
  margin-left      : 0;
}

// turns off the bullets for an entire list
@mixin no-bullets {
  list-style: none;
  li { @include no-bullet; }
}

// Make a list(ul/ol) have an image bullet.
//
// The mixin should be used like this for an icon that is 5x7:
//
//     ul.pretty
//       +pretty-bullets("my-icon.png", 5px, 7px)
//
// Additionally, if the image dimensions are not provided,
// The image dimensions will be extracted from the image itself.
//
//     ul.pretty
//       +pretty-bullets("my-icon.png")
//
@mixin pretty-bullets($bullet-icon, $width: image-width($bullet-icon), $height: image-height($bullet-icon), $line-height: 18px, $padding: 14px) {
  margin-left: 0;
  li {
    padding-left: $padding;
    background: image-url($bullet-icon) no-repeat ($padding - $width) / 2 ($line-height - $height) / 2;
    list-style-type: none;
  }
}

// @doc off
// Extends the bottom of the element to enclose any floats it contains.
// @doc on

// Usually compass hacks apply to both ie6 & 7 -- set this to false to disable support for both.
$legacy-support-for-ie: true !default;

// Setting this to false will result in smaller output, but no support for ie6 hacks
$legacy-support-for-ie6: $legacy-support-for-ie !default;

// Setting this to false will result in smaller output, but no support for ie7 hacks
$legacy-support-for-ie7: $legacy-support-for-ie !default;

// Setting this to false will result in smaller output, but no support for legacy ie8 hacks
$legacy-support-for-ie8: $legacy-support-for-ie !default;

// @private
// The user can simply set $legacy-support-for-ie and 6, 7, and 8 will be set accordingly,
// But in case the user set each of those explicitly, we need to sync the value of
// this combined variable.
$legacy-support-for-ie: $legacy-support-for-ie6 or $legacy-support-for-ie7 or $legacy-support-for-ie8;

// Whether to output legacy support for mozilla.
// Usually this means hacks to support Firefox 3.6 or earlier.
$legacy-support-for-mozilla: true;

// Support for mozilla in experimental css3 properties (-moz).
$experimental-support-for-mozilla      : true !default;
// Support for webkit in experimental css3 properties (-webkit).
$experimental-support-for-webkit       : true !default;
// Support for webkit's original (non-standard) gradient syntax.
$support-for-original-webkit-gradients : true !default;
// Support for opera in experimental css3 properties (-o).
$experimental-support-for-opera        : true !default;
// Support for microsoft in experimental css3 properties (-ms).
$experimental-support-for-microsoft    : true !default;
// Support for khtml in experimental css3 properties (-khtml).
$experimental-support-for-khtml        : false !default;
// Support for svg in experimental css3 properties.
// Setting this to true might add significant size to your
// generated stylesheets.
$experimental-support-for-svg          : false !default;
// Support for CSS PIE in experimental css3 properties (-pie).
$experimental-support-for-pie          : false !default;

// The `zoom` approach generates less CSS but does not validate.
// Set this to `block` to use the display-property to hack the
// element to gain layout.
$default-has-layout-approach: zoom !default;

// This mixin causes an element matching the selector
// to gain the "hasLayout" property in internet explorer.
// More information on [hasLayout](http://reference.sitepoint.com/css/haslayout).
@mixin has-layout($approach: $default-has-layout-approach) {
  @if $legacy-support-for-ie {
    @if $approach == zoom {
      @include has-layout-zoom;
    } @else if $approach == block {
      @include has-layout-block;
    } @else {
      @warn "Unknown has-layout approach: #{$approach}";
      @include has-layout-zoom;
    }
  }
}

@mixin has-layout-zoom {
  @if $legacy-support-for-ie6 or $legacy-support-for-ie7 {
    *zoom: 1;
  }
}

@mixin has-layout-block {
  @if $legacy-support-for-ie {
    // This makes ie6 get layout
    display: inline-block;
    // and this puts it back to block
    & { display: block; }
  }
}

// A hack to supply IE6 (and below) with a different property value.
// [Read more](http://www.cssportal.com/css-hacks/#in_css-important).
@mixin bang-hack($property, $value, $ie6-value) {
  @if $legacy-support-for-ie6 {
    #{$property}: #{$value} !important;
    #{$property}: #{$ie6-value};
  }
}

// This basic method is preferred for the usual case, when positioned
// content will not show outside the bounds of the container.
//
// Recommendations include using this in conjunction with a width.
// Credit: [quirksmode.org](http://www.quirksmode.org/blog/archives/2005/03/clearing_floats.html)
@mixin clearfix {
  overflow: hidden;
  @include has-layout;
}

// This older method from Position Is Everything called
// [Easy Clearing](http://www.positioniseverything.net/easyclearing.html)
// has the advantage of allowing positioned elements to hang
// outside the bounds of the container at the expense of more tricky CSS.
@mixin legacy-pie-clearfix {
  &:after {
    content    : "\0020";
    display    : block;
    height     : 0;
    clear      : both;
    overflow   : hidden;
    visibility : hidden;
  }
  @include has-layout;
}

// This is an updated version of the PIE clearfix method that reduces the amount of CSS output.
// If you need to support Firefox before 3.5 you need to use `legacy-pie-clearfix` instead.
//
// Adapted from: [A new micro clearfix hack](http://nicolasgallagher.com/micro-clearfix-hack/)
@mixin pie-clearfix {
  &:after {
    content: "";
    display: table;
    clear: both;
  }
  @include has-layout;
}

// This module has moved.
// Based on [Eric Meyer's reset 2.0](http://meyerweb.com/eric/tools/css/reset/index.html)
// Global reset rules.
// For more specific resets, use the reset mixins provided below
@mixin global-reset {
  html, body, div, span, applet, object, iframe,
  h1, h2, h3, h4, h5, h6, p, blockquote, pre,
  a, abbr, acronym, address, big, cite, code,
  del, dfn, em, img, ins, kbd, q, s, samp,
  small, strike, strong, sub, sup, tt, var,
  b, u, i, center,
  dl, dt, dd, ol, ul, li,
  fieldset, form, label, legend,
  table, caption, tbody, tfoot, thead, tr, th, td,
  article, aside, canvas, details, embed, 
  figure, figcaption, footer, header, hgroup, 
  menu, nav, output, ruby, section, summary,
  time, mark, audio, video {
    @include reset-box-model;
    @include reset-font; }
  // Unlike Eric's original reset, we reset the html element to be compatible
  // with the vertical rhythm mixins.
  html {
    @include reset-body; }
  ol, ul {
    @include reset-list-style; }
  table {
    @include reset-table; }
  caption, th, td {
    @include reset-table-cell; }
  q, blockquote {
    @include reset-quotation; }
  a img {
    @include reset-image-anchor-border; }
  @include reset-html5; }

// Reset all elements within some selector scope. To reset the selector itself,
// mixin the appropriate reset mixin for that element type as well. This could be
// useful if you want to style a part of your page in a dramatically different way.
@mixin nested-reset {
  div, span, applet, object, iframe,
  h1, h2, h3, h4, h5, h6, p, blockquote, pre,
  a, abbr, acronym, address, big, cite, code,
  del, dfn, em, img, ins, kbd, q, s, samp,
  small, strike, strong, sub, sup, tt, var,
  b, u, i, center,
  dl, dt, dd, ol, ul, li,
  fieldset, form, label, legend,
  table, caption, tbody, tfoot, thead, tr, th, td,
  article, aside, canvas, details, embed, 
  figure, figcaption, footer, header, hgroup, 
  menu, nav, output, ruby, section, summary,
  time, mark, audio, video {
    @include reset-box-model;
    @include reset-font; }
  table {
    @include reset-table; }
  caption, th, td {
    @include reset-table-cell; }
  q, blockquote {
    @include reset-quotation; }
  a img {
    @include reset-image-anchor-border; } }

// Reset the box model measurements.
@mixin reset-box-model {
  margin: 0;
  padding: 0;
  border: 0; }

// Reset the font and vertical alignment.
@mixin reset-font {
  font: inherit;
  font-size: 100%;
  vertical-align: baseline; }

// Resets the outline when focus.
// For accessibility you need to apply some styling in its place.
@mixin reset-focus {
  outline: 0; }

// Reset a body element.
@mixin reset-body {
  line-height: 1; }

// Reset the list style of an element.
@mixin reset-list-style {
  list-style: none; }

// Reset a table
@mixin reset-table {
  border-collapse: collapse;
  border-spacing: 0; }

// Reset a table cell (`th`, `td`)
@mixin reset-table-cell {
  text-align: left;
  font-weight: normal;
  vertical-align: middle; }

// Reset a quotation (`q`, `blockquote`)
@mixin reset-quotation {
  quotes: none;
  &:before, &:after {
    content: ""; 
    content: none; } }

// Resets the border.
@mixin reset-image-anchor-border {
  border: none; }

// Unrecognized elements are displayed inline.
// This reset provides a basic reset for block html5 elements
// so they are rendered correctly in browsers that don't recognize them
// and reset in browsers that have default styles for them.
@mixin reset-html5 {
  #{elements-of-type(html5-block)} {
    display: block; } }

// Resets the display of inline and block elements to their default display
// according to their tag type. Elements that have a default display that varies across
// versions of html or browser are not handled here, but this covers the 90% use case.
// Usage Example:
//
//     // Turn off the display for both of these classes
//     .unregistered-only, .registered-only
//       display: none
//     // Now turn only one of them back on depending on some other context.
//     body.registered
//       +reset-display(".registered-only")
//     body.unregistered
//       +reset-display(".unregistered-only")
@mixin reset-display($selector: "", $important: false) {
  #{append-selector(elements-of-type("inline"), $selector)} {
    @if $important {
      display: inline !important; }
    @else {
      display: inline; } }
  #{append-selector(elements-of-type("block"), $selector)} {
    @if $important {
      display: block !important; }
    @else {
      display: block; } } }

// Implementation of float:left with fix for the
// [double-margin bug in IE5/6](http://www.positioniseverything.net/explorer/doubled-margin.html)
@mixin float-left {
  @include float(left); }

// Implementation of float:right with fix for the
// [double-margin bug in IE5/6](http://www.positioniseverything.net/explorer/doubled-margin.html)
@mixin float-right {
  @include float(right); }

// Direction independent float mixin that fixes the
// [double-margin bug in IE5/6](http://www.positioniseverything.net/explorer/doubled-margin.html)
@mixin float($side: left) {
  display: inline;
  float: unquote($side); }

// Resets floated elements back to their default of `float: none` and defaults
// to `display: block` unless you pass `inline` as an argument
//
// Usage Example:
//
//     body.homepage
//       #footer li
//         +float-left
//     body.signup
//       #footer li
//         +reset-float
@mixin reset-float($display: block) {
  float: none;
  display: $display; }
// Can be mixed into any selector that target a ul or ol that is meant
// to have a horizontal layout. Used to implement +horizontal-list.
@mixin horizontal-list-container {
  @include reset-box-model;
  @include clearfix; }

// Can be mixed into any li selector that is meant to participate in a horizontal layout.
// Used to implement +horizontal-list.
//
// :last-child is not fully supported
// see http://www.quirksmode.org/css/contents.html#t29 for the support matrix
//
// IE8 ignores rules that are included on the same line as :last-child
// see http://www.richardscarrott.co.uk/posts/view/ie8-last-child-bug for details
//
// Setting `$padding` to `false` disables the padding between list elements
@mixin horizontal-list-item($padding: 4px, $direction: left) {
  @include no-bullet;
  white-space: nowrap;
  @include float($direction);
  @if $padding {
    padding: {
      left: $padding;
      right: $padding;
    }
    &:first-child, &.first { padding-#{$direction}: 0; }
    &:last-child { padding-#{opposite-position($direction)}: 0; }
    &.last { padding-#{opposite-position($direction)}: 0; }
  }
}

// A list(ol,ul) that is layed out such that the elements are floated left and won't wrap.
// This is not an inline list.
//
// Setting `$padding` to `false` disables the padding between list elements
@mixin horizontal-list($padding: 4px, $direction: left) {
  @include horizontal-list-container;
  li {
    @include horizontal-list-item($padding, $direction); } }

// Implementation of float:left with fix for the
// [double-margin bug in IE5/6](http://www.positioniseverything.net/explorer/doubled-margin.html)
@mixin float-left {
  @include float(left); }

// Implementation of float:right with fix for the
// [double-margin bug in IE5/6](http://www.positioniseverything.net/explorer/doubled-margin.html)
@mixin float-right {
  @include float(right); }

// Direction independent float mixin that fixes the
// [double-margin bug in IE5/6](http://www.positioniseverything.net/explorer/doubled-margin.html)
@mixin float($side: left) {
  display: inline;
  float: unquote($side); }

// Resets floated elements back to their default of `float: none` and defaults
// to `display: block` unless you pass `inline` as an argument
//
// Usage Example:
//
//     body.homepage
//       #footer li
//         +float-left
//     body.signup
//       #footer li
//         +reset-float
@mixin reset-float($display: block) {
  float: none;
  display: $display; }
// Usually compass hacks apply to both ie6 & 7 -- set this to false to disable support for both.
$legacy-support-for-ie: true !default;

// Setting this to false will result in smaller output, but no support for ie6 hacks
$legacy-support-for-ie6: $legacy-support-for-ie !default;

// Setting this to false will result in smaller output, but no support for ie7 hacks
$legacy-support-for-ie7: $legacy-support-for-ie !default;

// Setting this to false will result in smaller output, but no support for legacy ie8 hacks
$legacy-support-for-ie8: $legacy-support-for-ie !default;

// @private
// The user can simply set $legacy-support-for-ie and 6, 7, and 8 will be set accordingly,
// But in case the user set each of those explicitly, we need to sync the value of
// this combined variable.
$legacy-support-for-ie: $legacy-support-for-ie6 or $legacy-support-for-ie7 or $legacy-support-for-ie8;

// Whether to output legacy support for mozilla.
// Usually this means hacks to support Firefox 3.6 or earlier.
$legacy-support-for-mozilla: true;

// Support for mozilla in experimental css3 properties (-moz).
$experimental-support-for-mozilla      : true !default;
// Support for webkit in experimental css3 properties (-webkit).
$experimental-support-for-webkit       : true !default;
// Support for webkit's original (non-standard) gradient syntax.
$support-for-original-webkit-gradients : true !default;
// Support for opera in experimental css3 properties (-o).
$experimental-support-for-opera        : true !default;
// Support for microsoft in experimental css3 properties (-ms).
$experimental-support-for-microsoft    : true !default;
// Support for khtml in experimental css3 properties (-khtml).
$experimental-support-for-khtml        : false !default;
// Support for svg in experimental css3 properties.
// Setting this to true might add significant size to your
// generated stylesheets.
$experimental-support-for-svg          : false !default;
// Support for CSS PIE in experimental css3 properties (-pie).
$experimental-support-for-pie          : false !default;

// This mixin provides basic support for CSS3 properties and
// their corresponding experimental CSS2 properties when
// the implementations are identical except for the property
// prefix.
@mixin experimental($property, $value,
  $moz      : $experimental-support-for-mozilla,
  $webkit   : $experimental-support-for-webkit,
  $o        : $experimental-support-for-opera,
  $ms       : $experimental-support-for-microsoft,
  $khtml    : $experimental-support-for-khtml,
  $official : true
) {
  @if $webkit  and $experimental-support-for-webkit    { -webkit-#{$property} : $value; }
  @if $khtml   and $experimental-support-for-khtml     {  -khtml-#{$property} : $value; }
  @if $moz     and $experimental-support-for-mozilla   {    -moz-#{$property} : $value; }
  @if $ms      and $experimental-support-for-microsoft {     -ms-#{$property} : $value; }
  @if $o       and $experimental-support-for-opera     {      -o-#{$property} : $value; }
  @if $official                                        {         #{$property} : $value; }
}

// Same as experimental(), but for cases when the property is the same and the value is vendorized
@mixin experimental-value($property, $value,
  $moz      : $experimental-support-for-mozilla,
  $webkit   : $experimental-support-for-webkit,
  $o        : $experimental-support-for-opera,
  $ms       : $experimental-support-for-microsoft,
  $khtml    : $experimental-support-for-khtml,
  $official : true
) {
  @if $webkit  and $experimental-support-for-webkit    { #{$property} : -webkit-#{$value}; }
  @if $khtml   and $experimental-support-for-khtml     { #{$property} :  -khtml-#{$value}; }
  @if $moz     and $experimental-support-for-mozilla   { #{$property} :    -moz-#{$value}; }
  @if $ms      and $experimental-support-for-microsoft { #{$property} :     -ms-#{$value}; }
  @if $o       and $experimental-support-for-opera     { #{$property} :      -o-#{$value}; }
  @if $official                                        { #{$property} :         #{$value}; }
}

// Set `$inline-block-alignment` to `none` or `false` to disable the output
// of a vertical-align property in the inline-block mixin.
// Or set it to a legal value for `vertical-align` to change the default.
$inline-block-alignment: middle !default;

// Provides a cross-browser method to implement `display: inline-block;`
@mixin inline-block($alignment: $inline-block-alignment) {
  @if $legacy-support-for-mozilla {
    display: -moz-inline-stack;
  }
  display: inline-block;
  @if $alignment and $alignment != none {
    vertical-align: $alignment;
  }
  @if $legacy-support-for-ie {
    *vertical-align: auto;
    zoom: 1;
    *display: inline;
  }
}

// Can be mixed into any selector that target a ul or ol that is meant
// to have an inline-block layout. Used to implement `inline-block-list`.
@mixin inline-block-list-container {
  @include horizontal-list-container; }

// Can be mixed into any li selector that is meant to participate in a horizontal layout.
// Used to implement `inline-block-list`.
@mixin inline-block-list-item($padding: false) {
  @include no-bullet;
  @include inline-block;
  white-space: nowrap;
  @if $padding {
    padding: {
      left: $padding;
      right: $padding;
    };
  }
}

// A list(ol,ul) that is layed out such that the elements are inline-block and won't wrap.
@mixin inline-block-list($padding: false) {
  @include inline-block-list-container;
  li {
    @include inline-block-list-item($padding); } }

// Turn off the bullet for an element of a list
@mixin no-bullet {
  list-style-image : none;
  list-style-type  : none;
  margin-left      : 0;
}

// turns off the bullets for an entire list
@mixin no-bullets {
  list-style: none;
  li { @include no-bullet; }
}

// Make a list(ul/ol) have an image bullet.
//
// The mixin should be used like this for an icon that is 5x7:
//
//     ul.pretty
//       +pretty-bullets("my-icon.png", 5px, 7px)
//
// Additionally, if the image dimensions are not provided,
// The image dimensions will be extracted from the image itself.
//
//     ul.pretty
//       +pretty-bullets("my-icon.png")
//
@mixin pretty-bullets($bullet-icon, $width: image-width($bullet-icon), $height: image-height($bullet-icon), $line-height: 18px, $padding: 14px) {
  margin-left: 0;
  li {
    padding-left: $padding;
    background: image-url($bullet-icon) no-repeat ($padding - $width) / 2 ($line-height - $height) / 2;
    list-style-type: none;
  }
}

// Usually compass hacks apply to both ie6 & 7 -- set this to false to disable support for both.
$legacy-support-for-ie: true !default;

// Setting this to false will result in smaller output, but no support for ie6 hacks
$legacy-support-for-ie6: $legacy-support-for-ie !default;

// Setting this to false will result in smaller output, but no support for ie7 hacks
$legacy-support-for-ie7: $legacy-support-for-ie !default;

// Setting this to false will result in smaller output, but no support for legacy ie8 hacks
$legacy-support-for-ie8: $legacy-support-for-ie !default;

// @private
// The user can simply set $legacy-support-for-ie and 6, 7, and 8 will be set accordingly,
// But in case the user set each of those explicitly, we need to sync the value of
// this combined variable.
$legacy-support-for-ie: $legacy-support-for-ie6 or $legacy-support-for-ie7 or $legacy-support-for-ie8;

// Whether to output legacy support for mozilla.
// Usually this means hacks to support Firefox 3.6 or earlier.
$legacy-support-for-mozilla: true;

// Support for mozilla in experimental css3 properties (-moz).
$experimental-support-for-mozilla      : true !default;
// Support for webkit in experimental css3 properties (-webkit).
$experimental-support-for-webkit       : true !default;
// Support for webkit's original (non-standard) gradient syntax.
$support-for-original-webkit-gradients : true !default;
// Support for opera in experimental css3 properties (-o).
$experimental-support-for-opera        : true !default;
// Support for microsoft in experimental css3 properties (-ms).
$experimental-support-for-microsoft    : true !default;
// Support for khtml in experimental css3 properties (-khtml).
$experimental-support-for-khtml        : false !default;
// Support for svg in experimental css3 properties.
// Setting this to true might add significant size to your
// generated stylesheets.
$experimental-support-for-svg          : false !default;
// Support for CSS PIE in experimental css3 properties (-pie).
$experimental-support-for-pie          : false !default;

// This mixin provides basic support for CSS3 properties and
// their corresponding experimental CSS2 properties when
// the implementations are identical except for the property
// prefix.
@mixin experimental($property, $value,
  $moz      : $experimental-support-for-mozilla,
  $webkit   : $experimental-support-for-webkit,
  $o        : $experimental-support-for-opera,
  $ms       : $experimental-support-for-microsoft,
  $khtml    : $experimental-support-for-khtml,
  $official : true
) {
  @if $webkit  and $experimental-support-for-webkit    { -webkit-#{$property} : $value; }
  @if $khtml   and $experimental-support-for-khtml     {  -khtml-#{$property} : $value; }
  @if $moz     and $experimental-support-for-mozilla   {    -moz-#{$property} : $value; }
  @if $ms      and $experimental-support-for-microsoft {     -ms-#{$property} : $value; }
  @if $o       and $experimental-support-for-opera     {      -o-#{$property} : $value; }
  @if $official                                        {         #{$property} : $value; }
}

// Same as experimental(), but for cases when the property is the same and the value is vendorized
@mixin experimental-value($property, $value,
  $moz      : $experimental-support-for-mozilla,
  $webkit   : $experimental-support-for-webkit,
  $o        : $experimental-support-for-opera,
  $ms       : $experimental-support-for-microsoft,
  $khtml    : $experimental-support-for-khtml,
  $official : true
) {
  @if $webkit  and $experimental-support-for-webkit    { #{$property} : -webkit-#{$value}; }
  @if $khtml   and $experimental-support-for-khtml     { #{$property} :  -khtml-#{$value}; }
  @if $moz     and $experimental-support-for-mozilla   { #{$property} :    -moz-#{$value}; }
  @if $ms      and $experimental-support-for-microsoft { #{$property} :     -ms-#{$value}; }
  @if $o       and $experimental-support-for-opera     { #{$property} :      -o-#{$value}; }
  @if $official                                        { #{$property} :         #{$value}; }
}

// To get full firefox support, you must install the ellipsis pattern:
//
//     compass install compass/ellipsis
$use-mozilla-ellipsis-binding: false !default;

// This technique, by [Justin Maxwell](http://code404.com/), was originally
// published [here](http://mattsnider.com/css/css-string-truncation-with-ellipsis/).
// Firefox implementation by [Rikkert Koppes](http://www.rikkertkoppes.com/thoughts/2008/6/).
@mixin ellipsis($no-wrap: true) {
  @if $no-wrap { white-space: nowrap; }
  overflow: hidden;
  @include experimental(text-overflow, ellipsis,
    not(-moz),
    not(-webkit),
    -o,
    -ms,
    not(-khtml),
    official
  );
  @if $experimental-support-for-mozilla and $use-mozilla-ellipsis-binding {
    -moz-binding: stylesheet-url(unquote("xml/ellipsis.xml#ellipsis"));
  }
}

// When remembering whether or not there's a hyphen in white-space is too hard
@mixin nowrap { white-space: nowrap; }

// Indicates the direction you prefer to move your text
// when hiding it.
//
// `left` is more robust, especially in older browsers.
// `right` seems have better runtime performance.
$hide-text-direction: left !default;

// Hides html text and replaces it with an image.
// If you use this on an inline element, you will need to change the display to block or inline-block.
// Also, if the size of the image differs significantly from the font size, you'll need to set the width and/or height.
//
// Parameters:
//
// * `img` -- the relative path from the project image directory to the image, or a url literal.
// * `x` -- the x position of the background image.
// * `y` -- the y position of the background image.
@mixin replace-text($img, $x: 50%, $y: 50%) {
  @include hide-text;
  background: {
    @if is-url($img) {
      image: url($img);
    } @else {
      image: image-url($img);
    }
    repeat: no-repeat;
    position: $x $y;
  };
}

// Like the `replace-text` mixin, but also sets the width
// and height of the element according the dimensions of the image.
//
// If you set `$inline` to true, then an inline image (data uri) will be used.
@mixin replace-text-with-dimensions($img, $x: 50%, $y: 50%, $inline: false) {
  @include replace-text(if($inline, inline-image($img), $img), $x, $y);
  width: image-width($img);
  height: image-height($img);
}

// Hides text in an element so you can see the background.
//
// The direction indicates how the text should be moved out of view.
//
// See `$hide-text-direction` for more information and to set this globally
// for your application.
@mixin hide-text($direction: $hide-text-direction) {
  @if $direction == left {
    $approximate-em-value: 12px;
    $wider-than-any-screen: -9999;
    text-indent: $wider-than-any-screen * $approximate-em-value;
    overflow: hidden;
    text-align: left;
  } @else {
    // slightly wider than the box prevents issues with inline-block elements
    text-indent: 110%;
    white-space: nowrap;
    overflow: hidden;
  }
}

// Hides text in an element by squishing the text into oblivion.
// Use this if you need to hide text contained in an inline element
// but still have it read by a screen reader.
@mixin squish-text {
  font: 0/0 serif;
  text-shadow: none;
  color: transparent;
}

// Prevent long urls and text from breaking layouts
// [originally from perishablepress.com](http://perishablepress.com/press/2010/06/01/wrapping-content/)
@mixin force-wrap {
  white-space: pre;           // CSS 2.0
  white-space: pre-wrap;      // CSS 2.1
  white-space: pre-line;      // CSS 3.0
  white-space: -pre-wrap;     // Opera 4-6
  white-space: -o-pre-wrap;   // Opera 7
  white-space: -moz-pre-wrap; // Mozilla
  white-space: -hp-pre-wrap;  // HP Printers
  word-wrap: break-word;      // IE 5+
}

// a link that only has an underline when you hover over it
@mixin hover-link {
  text-decoration: none;
  &:hover {
    text-decoration: underline; } }

// Set all the colors for a link with one mixin call.
// Order of arguments is:
//
// 1. normal
// 2. hover
// 3. active
// 4. visited
// 5. focus
//
// Those states not specified will inherit.
// Mixin to an anchor link like so:
//     a
//       +link-colors(#00c, #0cc, #c0c, #ccc, #cc0)

@mixin link-colors($normal, $hover: false, $active: false, $visited: false, $focus: false) {
  color: $normal;
  @if $visited {
    &:visited {
      color: $visited; } }
  @if $focus {
    &:focus {
      color: $focus; } }
  @if $hover {
    &:hover {
      color: $hover; } }
  @if $active {
    &:active {
      color: $active; } } }

// A link that looks and acts like the text it is contained within
@mixin unstyled-link {
  color: inherit;
  text-decoration: inherit;
  cursor: inherit;
  &:active, &:focus {
    outline: none; } }

// Horizontal list layout module.
//
// Easy mode using simple descendant li selectors:
//
//   ul.nav
//     +horizontal-list
//
// Advanced mode:
// If you need to target the list items using a different selector then use
// +horizontal-list-container on your ul/ol and +horizontal-list-item on your li.
// This may help when working on layouts involving nested lists. For example:
//
//   ul.nav
//     +horizontal-list-container
//     > li
//       +horizontal-list-item

// Turn off the bullet for an element of a list
@mixin no-bullet {
  list-style-image : none;
  list-style-type  : none;
  margin-left      : 0;
}

// turns off the bullets for an entire list
@mixin no-bullets {
  list-style: none;
  li { @include no-bullet; }
}

// Make a list(ul/ol) have an image bullet.
//
// The mixin should be used like this for an icon that is 5x7:
//
//     ul.pretty
//       +pretty-bullets("my-icon.png", 5px, 7px)
//
// Additionally, if the image dimensions are not provided,
// The image dimensions will be extracted from the image itself.
//
//     ul.pretty
//       +pretty-bullets("my-icon.png")
//
@mixin pretty-bullets($bullet-icon, $width: image-width($bullet-icon), $height: image-height($bullet-icon), $line-height: 18px, $padding: 14px) {
  margin-left: 0;
  li {
    padding-left: $padding;
    background: image-url($bullet-icon) no-repeat ($padding - $width) / 2 ($line-height - $height) / 2;
    list-style-type: none;
  }
}

// @doc off
// Extends the bottom of the element to enclose any floats it contains.
// @doc on

// Usually compass hacks apply to both ie6 & 7 -- set this to false to disable support for both.
$legacy-support-for-ie: true !default;

// Setting this to false will result in smaller output, but no support for ie6 hacks
$legacy-support-for-ie6: $legacy-support-for-ie !default;

// Setting this to false will result in smaller output, but no support for ie7 hacks
$legacy-support-for-ie7: $legacy-support-for-ie !default;

// Setting this to false will result in smaller output, but no support for legacy ie8 hacks
$legacy-support-for-ie8: $legacy-support-for-ie !default;

// @private
// The user can simply set $legacy-support-for-ie and 6, 7, and 8 will be set accordingly,
// But in case the user set each of those explicitly, we need to sync the value of
// this combined variable.
$legacy-support-for-ie: $legacy-support-for-ie6 or $legacy-support-for-ie7 or $legacy-support-for-ie8;

// Whether to output legacy support for mozilla.
// Usually this means hacks to support Firefox 3.6 or earlier.
$legacy-support-for-mozilla: true;

// Support for mozilla in experimental css3 properties (-moz).
$experimental-support-for-mozilla      : true !default;
// Support for webkit in experimental css3 properties (-webkit).
$experimental-support-for-webkit       : true !default;
// Support for webkit's original (non-standard) gradient syntax.
$support-for-original-webkit-gradients : true !default;
// Support for opera in experimental css3 properties (-o).
$experimental-support-for-opera        : true !default;
// Support for microsoft in experimental css3 properties (-ms).
$experimental-support-for-microsoft    : true !default;
// Support for khtml in experimental css3 properties (-khtml).
$experimental-support-for-khtml        : false !default;
// Support for svg in experimental css3 properties.
// Setting this to true might add significant size to your
// generated stylesheets.
$experimental-support-for-svg          : false !default;
// Support for CSS PIE in experimental css3 properties (-pie).
$experimental-support-for-pie          : false !default;

// The `zoom` approach generates less CSS but does not validate.
// Set this to `block` to use the display-property to hack the
// element to gain layout.
$default-has-layout-approach: zoom !default;

// This mixin causes an element matching the selector
// to gain the "hasLayout" property in internet explorer.
// More information on [hasLayout](http://reference.sitepoint.com/css/haslayout).
@mixin has-layout($approach: $default-has-layout-approach) {
  @if $legacy-support-for-ie {
    @if $approach == zoom {
      @include has-layout-zoom;
    } @else if $approach == block {
      @include has-layout-block;
    } @else {
      @warn "Unknown has-layout approach: #{$approach}";
      @include has-layout-zoom;
    }
  }
}

@mixin has-layout-zoom {
  @if $legacy-support-for-ie6 or $legacy-support-for-ie7 {
    *zoom: 1;
  }
}

@mixin has-layout-block {
  @if $legacy-support-for-ie {
    // This makes ie6 get layout
    display: inline-block;
    // and this puts it back to block
    & { display: block; }
  }
}

// A hack to supply IE6 (and below) with a different property value.
// [Read more](http://www.cssportal.com/css-hacks/#in_css-important).
@mixin bang-hack($property, $value, $ie6-value) {
  @if $legacy-support-for-ie6 {
    #{$property}: #{$value} !important;
    #{$property}: #{$ie6-value};
  }
}

// This basic method is preferred for the usual case, when positioned
// content will not show outside the bounds of the container.
//
// Recommendations include using this in conjunction with a width.
// Credit: [quirksmode.org](http://www.quirksmode.org/blog/archives/2005/03/clearing_floats.html)
@mixin clearfix {
  overflow: hidden;
  @include has-layout;
}

// This older method from Position Is Everything called
// [Easy Clearing](http://www.positioniseverything.net/easyclearing.html)
// has the advantage of allowing positioned elements to hang
// outside the bounds of the container at the expense of more tricky CSS.
@mixin legacy-pie-clearfix {
  &:after {
    content    : "\0020";
    display    : block;
    height     : 0;
    clear      : both;
    overflow   : hidden;
    visibility : hidden;
  }
  @include has-layout;
}

// This is an updated version of the PIE clearfix method that reduces the amount of CSS output.
// If you need to support Firefox before 3.5 you need to use `legacy-pie-clearfix` instead.
//
// Adapted from: [A new micro clearfix hack](http://nicolasgallagher.com/micro-clearfix-hack/)
@mixin pie-clearfix {
  &:after {
    content: "";
    display: table;
    clear: both;
  }
  @include has-layout;
}

// This module has moved.
// Based on [Eric Meyer's reset 2.0](http://meyerweb.com/eric/tools/css/reset/index.html)
// Global reset rules.
// For more specific resets, use the reset mixins provided below
@mixin global-reset {
  html, body, div, span, applet, object, iframe,
  h1, h2, h3, h4, h5, h6, p, blockquote, pre,
  a, abbr, acronym, address, big, cite, code,
  del, dfn, em, img, ins, kbd, q, s, samp,
  small, strike, strong, sub, sup, tt, var,
  b, u, i, center,
  dl, dt, dd, ol, ul, li,
  fieldset, form, label, legend,
  table, caption, tbody, tfoot, thead, tr, th, td,
  article, aside, canvas, details, embed, 
  figure, figcaption, footer, header, hgroup, 
  menu, nav, output, ruby, section, summary,
  time, mark, audio, video {
    @include reset-box-model;
    @include reset-font; }
  // Unlike Eric's original reset, we reset the html element to be compatible
  // with the vertical rhythm mixins.
  html {
    @include reset-body; }
  ol, ul {
    @include reset-list-style; }
  table {
    @include reset-table; }
  caption, th, td {
    @include reset-table-cell; }
  q, blockquote {
    @include reset-quotation; }
  a img {
    @include reset-image-anchor-border; }
  @include reset-html5; }

// Reset all elements within some selector scope. To reset the selector itself,
// mixin the appropriate reset mixin for that element type as well. This could be
// useful if you want to style a part of your page in a dramatically different way.
@mixin nested-reset {
  div, span, applet, object, iframe,
  h1, h2, h3, h4, h5, h6, p, blockquote, pre,
  a, abbr, acronym, address, big, cite, code,
  del, dfn, em, img, ins, kbd, q, s, samp,
  small, strike, strong, sub, sup, tt, var,
  b, u, i, center,
  dl, dt, dd, ol, ul, li,
  fieldset, form, label, legend,
  table, caption, tbody, tfoot, thead, tr, th, td,
  article, aside, canvas, details, embed, 
  figure, figcaption, footer, header, hgroup, 
  menu, nav, output, ruby, section, summary,
  time, mark, audio, video {
    @include reset-box-model;
    @include reset-font; }
  table {
    @include reset-table; }
  caption, th, td {
    @include reset-table-cell; }
  q, blockquote {
    @include reset-quotation; }
  a img {
    @include reset-image-anchor-border; } }

// Reset the box model measurements.
@mixin reset-box-model {
  margin: 0;
  padding: 0;
  border: 0; }

// Reset the font and vertical alignment.
@mixin reset-font {
  font: inherit;
  font-size: 100%;
  vertical-align: baseline; }

// Resets the outline when focus.
// For accessibility you need to apply some styling in its place.
@mixin reset-focus {
  outline: 0; }

// Reset a body element.
@mixin reset-body {
  line-height: 1; }

// Reset the list style of an element.
@mixin reset-list-style {
  list-style: none; }

// Reset a table
@mixin reset-table {
  border-collapse: collapse;
  border-spacing: 0; }

// Reset a table cell (`th`, `td`)
@mixin reset-table-cell {
  text-align: left;
  font-weight: normal;
  vertical-align: middle; }

// Reset a quotation (`q`, `blockquote`)
@mixin reset-quotation {
  quotes: none;
  &:before, &:after {
    content: ""; 
    content: none; } }

// Resets the border.
@mixin reset-image-anchor-border {
  border: none; }

// Unrecognized elements are displayed inline.
// This reset provides a basic reset for block html5 elements
// so they are rendered correctly in browsers that don't recognize them
// and reset in browsers that have default styles for them.
@mixin reset-html5 {
  #{elements-of-type(html5-block)} {
    display: block; } }

// Resets the display of inline and block elements to their default display
// according to their tag type. Elements that have a default display that varies across
// versions of html or browser are not handled here, but this covers the 90% use case.
// Usage Example:
//
//     // Turn off the display for both of these classes
//     .unregistered-only, .registered-only
//       display: none
//     // Now turn only one of them back on depending on some other context.
//     body.registered
//       +reset-display(".registered-only")
//     body.unregistered
//       +reset-display(".unregistered-only")
@mixin reset-display($selector: "", $important: false) {
  #{append-selector(elements-of-type("inline"), $selector)} {
    @if $important {
      display: inline !important; }
    @else {
      display: inline; } }
  #{append-selector(elements-of-type("block"), $selector)} {
    @if $important {
      display: block !important; }
    @else {
      display: block; } } }

// Implementation of float:left with fix for the
// [double-margin bug in IE5/6](http://www.positioniseverything.net/explorer/doubled-margin.html)
@mixin float-left {
  @include float(left); }

// Implementation of float:right with fix for the
// [double-margin bug in IE5/6](http://www.positioniseverything.net/explorer/doubled-margin.html)
@mixin float-right {
  @include float(right); }

// Direction independent float mixin that fixes the
// [double-margin bug in IE5/6](http://www.positioniseverything.net/explorer/doubled-margin.html)
@mixin float($side: left) {
  display: inline;
  float: unquote($side); }

// Resets floated elements back to their default of `float: none` and defaults
// to `display: block` unless you pass `inline` as an argument
//
// Usage Example:
//
//     body.homepage
//       #footer li
//         +float-left
//     body.signup
//       #footer li
//         +reset-float
@mixin reset-float($display: block) {
  float: none;
  display: $display; }
// Can be mixed into any selector that target a ul or ol that is meant
// to have a horizontal layout. Used to implement +horizontal-list.
@mixin horizontal-list-container {
  @include reset-box-model;
  @include clearfix; }

// Can be mixed into any li selector that is meant to participate in a horizontal layout.
// Used to implement +horizontal-list.
//
// :last-child is not fully supported
// see http://www.quirksmode.org/css/contents.html#t29 for the support matrix
//
// IE8 ignores rules that are included on the same line as :last-child
// see http://www.richardscarrott.co.uk/posts/view/ie8-last-child-bug for details
//
// Setting `$padding` to `false` disables the padding between list elements
@mixin horizontal-list-item($padding: 4px, $direction: left) {
  @include no-bullet;
  white-space: nowrap;
  @include float($direction);
  @if $padding {
    padding: {
      left: $padding;
      right: $padding;
    }
    &:first-child, &.first { padding-#{$direction}: 0; }
    &:last-child { padding-#{opposite-position($direction)}: 0; }
    &.last { padding-#{opposite-position($direction)}: 0; }
  }
}

// A list(ol,ul) that is layed out such that the elements are floated left and won't wrap.
// This is not an inline list.
//
// Setting `$padding` to `false` disables the padding between list elements
@mixin horizontal-list($padding: 4px, $direction: left) {
  @include horizontal-list-container;
  li {
    @include horizontal-list-item($padding, $direction); } }

// makes a list inline.

@mixin inline-list {
  list-style-type: none;
  &, & li {
    margin: 0px;
    padding: 0px;
    display: inline;
  }
}

// makes an inline list delimited with the passed string.
// Defaults to making a comma-separated list.
//
// Please make note of the browser support issues before using this mixin:
//
// use of `content` and `:after` is not fully supported in all browsers.
// See quirksmode for the [support matrix](http://www.quirksmode.org/css/contents.html#t15)
//
// `:last-child` is not fully supported.
// see quirksmode for the [support matrix](http://www.quirksmode.org/css/contents.html#t29).
//
// IE8 ignores rules that are included on the same line as :last-child
// see http://www.richardscarrott.co.uk/posts/view/ie8-last-child-bug for details

@mixin delimited-list($separator: ", ") {
  @include inline-list;
  li {
    &:after { content: $separator; }
    &:last-child {
      &:after { content: ""; }
    }
    &.last {
      &:after { content: ""; }
    }
  }
}

// See [delimited-list](#mixin-delimited-list)
// @deprecated
@mixin comma-delimited-list {
  @warn "comma-delimited-list is deprecated. Please use delimited-list instead.";
  @include delimited-list;
}

// Inline-Block list layout module.
//
// Easy mode using simple descendant li selectors:
//
//     ul.nav {
//       @import inline-block-list;
//     }
//
// Advanced mode:
// If you need to target the list items using a different selector then use
// `@include inline-block-list-container` on your ul/ol and
// `@include inline-block-list-item` on your li. This may help when working
// on layouts involving nested lists. For example:
//
//     ul.nav {
//       @include inline-block-list-container;
//       > li {
//         @include inline-block-list-item;
//       }
//     }

// Turn off the bullet for an element of a list
@mixin no-bullet {
  list-style-image : none;
  list-style-type  : none;
  margin-left      : 0;
}

// turns off the bullets for an entire list
@mixin no-bullets {
  list-style: none;
  li { @include no-bullet; }
}

// Make a list(ul/ol) have an image bullet.
//
// The mixin should be used like this for an icon that is 5x7:
//
//     ul.pretty
//       +pretty-bullets("my-icon.png", 5px, 7px)
//
// Additionally, if the image dimensions are not provided,
// The image dimensions will be extracted from the image itself.
//
//     ul.pretty
//       +pretty-bullets("my-icon.png")
//
@mixin pretty-bullets($bullet-icon, $width: image-width($bullet-icon), $height: image-height($bullet-icon), $line-height: 18px, $padding: 14px) {
  margin-left: 0;
  li {
    padding-left: $padding;
    background: image-url($bullet-icon) no-repeat ($padding - $width) / 2 ($line-height - $height) / 2;
    list-style-type: none;
  }
}

// Horizontal list layout module.
//
// Easy mode using simple descendant li selectors:
//
//   ul.nav
//     +horizontal-list
//
// Advanced mode:
// If you need to target the list items using a different selector then use
// +horizontal-list-container on your ul/ol and +horizontal-list-item on your li.
// This may help when working on layouts involving nested lists. For example:
//
//   ul.nav
//     +horizontal-list-container
//     > li
//       +horizontal-list-item

// Turn off the bullet for an element of a list
@mixin no-bullet {
  list-style-image : none;
  list-style-type  : none;
  margin-left      : 0;
}

// turns off the bullets for an entire list
@mixin no-bullets {
  list-style: none;
  li { @include no-bullet; }
}

// Make a list(ul/ol) have an image bullet.
//
// The mixin should be used like this for an icon that is 5x7:
//
//     ul.pretty
//       +pretty-bullets("my-icon.png", 5px, 7px)
//
// Additionally, if the image dimensions are not provided,
// The image dimensions will be extracted from the image itself.
//
//     ul.pretty
//       +pretty-bullets("my-icon.png")
//
@mixin pretty-bullets($bullet-icon, $width: image-width($bullet-icon), $height: image-height($bullet-icon), $line-height: 18px, $padding: 14px) {
  margin-left: 0;
  li {
    padding-left: $padding;
    background: image-url($bullet-icon) no-repeat ($padding - $width) / 2 ($line-height - $height) / 2;
    list-style-type: none;
  }
}

// @doc off
// Extends the bottom of the element to enclose any floats it contains.
// @doc on

// Usually compass hacks apply to both ie6 & 7 -- set this to false to disable support for both.
$legacy-support-for-ie: true !default;

// Setting this to false will result in smaller output, but no support for ie6 hacks
$legacy-support-for-ie6: $legacy-support-for-ie !default;

// Setting this to false will result in smaller output, but no support for ie7 hacks
$legacy-support-for-ie7: $legacy-support-for-ie !default;

// Setting this to false will result in smaller output, but no support for legacy ie8 hacks
$legacy-support-for-ie8: $legacy-support-for-ie !default;

// @private
// The user can simply set $legacy-support-for-ie and 6, 7, and 8 will be set accordingly,
// But in case the user set each of those explicitly, we need to sync the value of
// this combined variable.
$legacy-support-for-ie: $legacy-support-for-ie6 or $legacy-support-for-ie7 or $legacy-support-for-ie8;

// Whether to output legacy support for mozilla.
// Usually this means hacks to support Firefox 3.6 or earlier.
$legacy-support-for-mozilla: true;

// Support for mozilla in experimental css3 properties (-moz).
$experimental-support-for-mozilla      : true !default;
// Support for webkit in experimental css3 properties (-webkit).
$experimental-support-for-webkit       : true !default;
// Support for webkit's original (non-standard) gradient syntax.
$support-for-original-webkit-gradients : true !default;
// Support for opera in experimental css3 properties (-o).
$experimental-support-for-opera        : true !default;
// Support for microsoft in experimental css3 properties (-ms).
$experimental-support-for-microsoft    : true !default;
// Support for khtml in experimental css3 properties (-khtml).
$experimental-support-for-khtml        : false !default;
// Support for svg in experimental css3 properties.
// Setting this to true might add significant size to your
// generated stylesheets.
$experimental-support-for-svg          : false !default;
// Support for CSS PIE in experimental css3 properties (-pie).
$experimental-support-for-pie          : false !default;

// The `zoom` approach generates less CSS but does not validate.
// Set this to `block` to use the display-property to hack the
// element to gain layout.
$default-has-layout-approach: zoom !default;

// This mixin causes an element matching the selector
// to gain the "hasLayout" property in internet explorer.
// More information on [hasLayout](http://reference.sitepoint.com/css/haslayout).
@mixin has-layout($approach: $default-has-layout-approach) {
  @if $legacy-support-for-ie {
    @if $approach == zoom {
      @include has-layout-zoom;
    } @else if $approach == block {
      @include has-layout-block;
    } @else {
      @warn "Unknown has-layout approach: #{$approach}";
      @include has-layout-zoom;
    }
  }
}

@mixin has-layout-zoom {
  @if $legacy-support-for-ie6 or $legacy-support-for-ie7 {
    *zoom: 1;
  }
}

@mixin has-layout-block {
  @if $legacy-support-for-ie {
    // This makes ie6 get layout
    display: inline-block;
    // and this puts it back to block
    & { display: block; }
  }
}

// A hack to supply IE6 (and below) with a different property value.
// [Read more](http://www.cssportal.com/css-hacks/#in_css-important).
@mixin bang-hack($property, $value, $ie6-value) {
  @if $legacy-support-for-ie6 {
    #{$property}: #{$value} !important;
    #{$property}: #{$ie6-value};
  }
}

// This basic method is preferred for the usual case, when positioned
// content will not show outside the bounds of the container.
//
// Recommendations include using this in conjunction with a width.
// Credit: [quirksmode.org](http://www.quirksmode.org/blog/archives/2005/03/clearing_floats.html)
@mixin clearfix {
  overflow: hidden;
  @include has-layout;
}

// This older method from Position Is Everything called
// [Easy Clearing](http://www.positioniseverything.net/easyclearing.html)
// has the advantage of allowing positioned elements to hang
// outside the bounds of the container at the expense of more tricky CSS.
@mixin legacy-pie-clearfix {
  &:after {
    content    : "\0020";
    display    : block;
    height     : 0;
    clear      : both;
    overflow   : hidden;
    visibility : hidden;
  }
  @include has-layout;
}

// This is an updated version of the PIE clearfix method that reduces the amount of CSS output.
// If you need to support Firefox before 3.5 you need to use `legacy-pie-clearfix` instead.
//
// Adapted from: [A new micro clearfix hack](http://nicolasgallagher.com/micro-clearfix-hack/)
@mixin pie-clearfix {
  &:after {
    content: "";
    display: table;
    clear: both;
  }
  @include has-layout;
}

// This module has moved.
// Based on [Eric Meyer's reset 2.0](http://meyerweb.com/eric/tools/css/reset/index.html)
// Global reset rules.
// For more specific resets, use the reset mixins provided below
@mixin global-reset {
  html, body, div, span, applet, object, iframe,
  h1, h2, h3, h4, h5, h6, p, blockquote, pre,
  a, abbr, acronym, address, big, cite, code,
  del, dfn, em, img, ins, kbd, q, s, samp,
  small, strike, strong, sub, sup, tt, var,
  b, u, i, center,
  dl, dt, dd, ol, ul, li,
  fieldset, form, label, legend,
  table, caption, tbody, tfoot, thead, tr, th, td,
  article, aside, canvas, details, embed, 
  figure, figcaption, footer, header, hgroup, 
  menu, nav, output, ruby, section, summary,
  time, mark, audio, video {
    @include reset-box-model;
    @include reset-font; }
  // Unlike Eric's original reset, we reset the html element to be compatible
  // with the vertical rhythm mixins.
  html {
    @include reset-body; }
  ol, ul {
    @include reset-list-style; }
  table {
    @include reset-table; }
  caption, th, td {
    @include reset-table-cell; }
  q, blockquote {
    @include reset-quotation; }
  a img {
    @include reset-image-anchor-border; }
  @include reset-html5; }

// Reset all elements within some selector scope. To reset the selector itself,
// mixin the appropriate reset mixin for that element type as well. This could be
// useful if you want to style a part of your page in a dramatically different way.
@mixin nested-reset {
  div, span, applet, object, iframe,
  h1, h2, h3, h4, h5, h6, p, blockquote, pre,
  a, abbr, acronym, address, big, cite, code,
  del, dfn, em, img, ins, kbd, q, s, samp,
  small, strike, strong, sub, sup, tt, var,
  b, u, i, center,
  dl, dt, dd, ol, ul, li,
  fieldset, form, label, legend,
  table, caption, tbody, tfoot, thead, tr, th, td,
  article, aside, canvas, details, embed, 
  figure, figcaption, footer, header, hgroup, 
  menu, nav, output, ruby, section, summary,
  time, mark, audio, video {
    @include reset-box-model;
    @include reset-font; }
  table {
    @include reset-table; }
  caption, th, td {
    @include reset-table-cell; }
  q, blockquote {
    @include reset-quotation; }
  a img {
    @include reset-image-anchor-border; } }

// Reset the box model measurements.
@mixin reset-box-model {
  margin: 0;
  padding: 0;
  border: 0; }

// Reset the font and vertical alignment.
@mixin reset-font {
  font: inherit;
  font-size: 100%;
  vertical-align: baseline; }

// Resets the outline when focus.
// For accessibility you need to apply some styling in its place.
@mixin reset-focus {
  outline: 0; }

// Reset a body element.
@mixin reset-body {
  line-height: 1; }

// Reset the list style of an element.
@mixin reset-list-style {
  list-style: none; }

// Reset a table
@mixin reset-table {
  border-collapse: collapse;
  border-spacing: 0; }

// Reset a table cell (`th`, `td`)
@mixin reset-table-cell {
  text-align: left;
  font-weight: normal;
  vertical-align: middle; }

// Reset a quotation (`q`, `blockquote`)
@mixin reset-quotation {
  quotes: none;
  &:before, &:after {
    content: ""; 
    content: none; } }

// Resets the border.
@mixin reset-image-anchor-border {
  border: none; }

// Unrecognized elements are displayed inline.
// This reset provides a basic reset for block html5 elements
// so they are rendered correctly in browsers that don't recognize them
// and reset in browsers that have default styles for them.
@mixin reset-html5 {
  #{elements-of-type(html5-block)} {
    display: block; } }

// Resets the display of inline and block elements to their default display
// according to their tag type. Elements that have a default display that varies across
// versions of html or browser are not handled here, but this covers the 90% use case.
// Usage Example:
//
//     // Turn off the display for both of these classes
//     .unregistered-only, .registered-only
//       display: none
//     // Now turn only one of them back on depending on some other context.
//     body.registered
//       +reset-display(".registered-only")
//     body.unregistered
//       +reset-display(".unregistered-only")
@mixin reset-display($selector: "", $important: false) {
  #{append-selector(elements-of-type("inline"), $selector)} {
    @if $important {
      display: inline !important; }
    @else {
      display: inline; } }
  #{append-selector(elements-of-type("block"), $selector)} {
    @if $important {
      display: block !important; }
    @else {
      display: block; } } }

// Implementation of float:left with fix for the
// [double-margin bug in IE5/6](http://www.positioniseverything.net/explorer/doubled-margin.html)
@mixin float-left {
  @include float(left); }

// Implementation of float:right with fix for the
// [double-margin bug in IE5/6](http://www.positioniseverything.net/explorer/doubled-margin.html)
@mixin float-right {
  @include float(right); }

// Direction independent float mixin that fixes the
// [double-margin bug in IE5/6](http://www.positioniseverything.net/explorer/doubled-margin.html)
@mixin float($side: left) {
  display: inline;
  float: unquote($side); }

// Resets floated elements back to their default of `float: none` and defaults
// to `display: block` unless you pass `inline` as an argument
//
// Usage Example:
//
//     body.homepage
//       #footer li
//         +float-left
//     body.signup
//       #footer li
//         +reset-float
@mixin reset-float($display: block) {
  float: none;
  display: $display; }
// Can be mixed into any selector that target a ul or ol that is meant
// to have a horizontal layout. Used to implement +horizontal-list.
@mixin horizontal-list-container {
  @include reset-box-model;
  @include clearfix; }

// Can be mixed into any li selector that is meant to participate in a horizontal layout.
// Used to implement +horizontal-list.
//
// :last-child is not fully supported
// see http://www.quirksmode.org/css/contents.html#t29 for the support matrix
//
// IE8 ignores rules that are included on the same line as :last-child
// see http://www.richardscarrott.co.uk/posts/view/ie8-last-child-bug for details
//
// Setting `$padding` to `false` disables the padding between list elements
@mixin horizontal-list-item($padding: 4px, $direction: left) {
  @include no-bullet;
  white-space: nowrap;
  @include float($direction);
  @if $padding {
    padding: {
      left: $padding;
      right: $padding;
    }
    &:first-child, &.first { padding-#{$direction}: 0; }
    &:last-child { padding-#{opposite-position($direction)}: 0; }
    &.last { padding-#{opposite-position($direction)}: 0; }
  }
}

// A list(ol,ul) that is layed out such that the elements are floated left and won't wrap.
// This is not an inline list.
//
// Setting `$padding` to `false` disables the padding between list elements
@mixin horizontal-list($padding: 4px, $direction: left) {
  @include horizontal-list-container;
  li {
    @include horizontal-list-item($padding, $direction); } }

// Implementation of float:left with fix for the
// [double-margin bug in IE5/6](http://www.positioniseverything.net/explorer/doubled-margin.html)
@mixin float-left {
  @include float(left); }

// Implementation of float:right with fix for the
// [double-margin bug in IE5/6](http://www.positioniseverything.net/explorer/doubled-margin.html)
@mixin float-right {
  @include float(right); }

// Direction independent float mixin that fixes the
// [double-margin bug in IE5/6](http://www.positioniseverything.net/explorer/doubled-margin.html)
@mixin float($side: left) {
  display: inline;
  float: unquote($side); }

// Resets floated elements back to their default of `float: none` and defaults
// to `display: block` unless you pass `inline` as an argument
//
// Usage Example:
//
//     body.homepage
//       #footer li
//         +float-left
//     body.signup
//       #footer li
//         +reset-float
@mixin reset-float($display: block) {
  float: none;
  display: $display; }
// Usually compass hacks apply to both ie6 & 7 -- set this to false to disable support for both.
$legacy-support-for-ie: true !default;

// Setting this to false will result in smaller output, but no support for ie6 hacks
$legacy-support-for-ie6: $legacy-support-for-ie !default;

// Setting this to false will result in smaller output, but no support for ie7 hacks
$legacy-support-for-ie7: $legacy-support-for-ie !default;

// Setting this to false will result in smaller output, but no support for legacy ie8 hacks
$legacy-support-for-ie8: $legacy-support-for-ie !default;

// @private
// The user can simply set $legacy-support-for-ie and 6, 7, and 8 will be set accordingly,
// But in case the user set each of those explicitly, we need to sync the value of
// this combined variable.
$legacy-support-for-ie: $legacy-support-for-ie6 or $legacy-support-for-ie7 or $legacy-support-for-ie8;

// Whether to output legacy support for mozilla.
// Usually this means hacks to support Firefox 3.6 or earlier.
$legacy-support-for-mozilla: true;

// Support for mozilla in experimental css3 properties (-moz).
$experimental-support-for-mozilla      : true !default;
// Support for webkit in experimental css3 properties (-webkit).
$experimental-support-for-webkit       : true !default;
// Support for webkit's original (non-standard) gradient syntax.
$support-for-original-webkit-gradients : true !default;
// Support for opera in experimental css3 properties (-o).
$experimental-support-for-opera        : true !default;
// Support for microsoft in experimental css3 properties (-ms).
$experimental-support-for-microsoft    : true !default;
// Support for khtml in experimental css3 properties (-khtml).
$experimental-support-for-khtml        : false !default;
// Support for svg in experimental css3 properties.
// Setting this to true might add significant size to your
// generated stylesheets.
$experimental-support-for-svg          : false !default;
// Support for CSS PIE in experimental css3 properties (-pie).
$experimental-support-for-pie          : false !default;

// This mixin provides basic support for CSS3 properties and
// their corresponding experimental CSS2 properties when
// the implementations are identical except for the property
// prefix.
@mixin experimental($property, $value,
  $moz      : $experimental-support-for-mozilla,
  $webkit   : $experimental-support-for-webkit,
  $o        : $experimental-support-for-opera,
  $ms       : $experimental-support-for-microsoft,
  $khtml    : $experimental-support-for-khtml,
  $official : true
) {
  @if $webkit  and $experimental-support-for-webkit    { -webkit-#{$property} : $value; }
  @if $khtml   and $experimental-support-for-khtml     {  -khtml-#{$property} : $value; }
  @if $moz     and $experimental-support-for-mozilla   {    -moz-#{$property} : $value; }
  @if $ms      and $experimental-support-for-microsoft {     -ms-#{$property} : $value; }
  @if $o       and $experimental-support-for-opera     {      -o-#{$property} : $value; }
  @if $official                                        {         #{$property} : $value; }
}

// Same as experimental(), but for cases when the property is the same and the value is vendorized
@mixin experimental-value($property, $value,
  $moz      : $experimental-support-for-mozilla,
  $webkit   : $experimental-support-for-webkit,
  $o        : $experimental-support-for-opera,
  $ms       : $experimental-support-for-microsoft,
  $khtml    : $experimental-support-for-khtml,
  $official : true
) {
  @if $webkit  and $experimental-support-for-webkit    { #{$property} : -webkit-#{$value}; }
  @if $khtml   and $experimental-support-for-khtml     { #{$property} :  -khtml-#{$value}; }
  @if $moz     and $experimental-support-for-mozilla   { #{$property} :    -moz-#{$value}; }
  @if $ms      and $experimental-support-for-microsoft { #{$property} :     -ms-#{$value}; }
  @if $o       and $experimental-support-for-opera     { #{$property} :      -o-#{$value}; }
  @if $official                                        { #{$property} :         #{$value}; }
}

// Set `$inline-block-alignment` to `none` or `false` to disable the output
// of a vertical-align property in the inline-block mixin.
// Or set it to a legal value for `vertical-align` to change the default.
$inline-block-alignment: middle !default;

// Provides a cross-browser method to implement `display: inline-block;`
@mixin inline-block($alignment: $inline-block-alignment) {
  @if $legacy-support-for-mozilla {
    display: -moz-inline-stack;
  }
  display: inline-block;
  @if $alignment and $alignment != none {
    vertical-align: $alignment;
  }
  @if $legacy-support-for-ie {
    *vertical-align: auto;
    zoom: 1;
    *display: inline;
  }
}

// Can be mixed into any selector that target a ul or ol that is meant
// to have an inline-block layout. Used to implement `inline-block-list`.
@mixin inline-block-list-container {
  @include horizontal-list-container; }

// Can be mixed into any li selector that is meant to participate in a horizontal layout.
// Used to implement `inline-block-list`.
@mixin inline-block-list-item($padding: false) {
  @include no-bullet;
  @include inline-block;
  white-space: nowrap;
  @if $padding {
    padding: {
      left: $padding;
      right: $padding;
    };
  }
}

// A list(ol,ul) that is layed out such that the elements are inline-block and won't wrap.
@mixin inline-block-list($padding: false) {
  @include inline-block-list-container;
  li {
    @include inline-block-list-item($padding); } }

// Turn off the bullet for an element of a list
@mixin no-bullet {
  list-style-image : none;
  list-style-type  : none;
  margin-left      : 0;
}

// turns off the bullets for an entire list
@mixin no-bullets {
  list-style: none;
  li { @include no-bullet; }
}

// Make a list(ul/ol) have an image bullet.
//
// The mixin should be used like this for an icon that is 5x7:
//
//     ul.pretty
//       +pretty-bullets("my-icon.png", 5px, 7px)
//
// Additionally, if the image dimensions are not provided,
// The image dimensions will be extracted from the image itself.
//
//     ul.pretty
//       +pretty-bullets("my-icon.png")
//
@mixin pretty-bullets($bullet-icon, $width: image-width($bullet-icon), $height: image-height($bullet-icon), $line-height: 18px, $padding: 14px) {
  margin-left: 0;
  li {
    padding-left: $padding;
    background: image-url($bullet-icon) no-repeat ($padding - $width) / 2 ($line-height - $height) / 2;
    list-style-type: none;
  }
}

// Usually compass hacks apply to both ie6 & 7 -- set this to false to disable support for both.
$legacy-support-for-ie: true !default;

// Setting this to false will result in smaller output, but no support for ie6 hacks
$legacy-support-for-ie6: $legacy-support-for-ie !default;

// Setting this to false will result in smaller output, but no support for ie7 hacks
$legacy-support-for-ie7: $legacy-support-for-ie !default;

// Setting this to false will result in smaller output, but no support for legacy ie8 hacks
$legacy-support-for-ie8: $legacy-support-for-ie !default;

// @private
// The user can simply set $legacy-support-for-ie and 6, 7, and 8 will be set accordingly,
// But in case the user set each of those explicitly, we need to sync the value of
// this combined variable.
$legacy-support-for-ie: $legacy-support-for-ie6 or $legacy-support-for-ie7 or $legacy-support-for-ie8;

// Whether to output legacy support for mozilla.
// Usually this means hacks to support Firefox 3.6 or earlier.
$legacy-support-for-mozilla: true;

// Support for mozilla in experimental css3 properties (-moz).
$experimental-support-for-mozilla      : true !default;
// Support for webkit in experimental css3 properties (-webkit).
$experimental-support-for-webkit       : true !default;
// Support for webkit's original (non-standard) gradient syntax.
$support-for-original-webkit-gradients : true !default;
// Support for opera in experimental css3 properties (-o).
$experimental-support-for-opera        : true !default;
// Support for microsoft in experimental css3 properties (-ms).
$experimental-support-for-microsoft    : true !default;
// Support for khtml in experimental css3 properties (-khtml).
$experimental-support-for-khtml        : false !default;
// Support for svg in experimental css3 properties.
// Setting this to true might add significant size to your
// generated stylesheets.
$experimental-support-for-svg          : false !default;
// Support for CSS PIE in experimental css3 properties (-pie).
$experimental-support-for-pie          : false !default;

// This mixin provides basic support for CSS3 properties and
// their corresponding experimental CSS2 properties when
// the implementations are identical except for the property
// prefix.
@mixin experimental($property, $value,
  $moz      : $experimental-support-for-mozilla,
  $webkit   : $experimental-support-for-webkit,
  $o        : $experimental-support-for-opera,
  $ms       : $experimental-support-for-microsoft,
  $khtml    : $experimental-support-for-khtml,
  $official : true
) {
  @if $webkit  and $experimental-support-for-webkit    { -webkit-#{$property} : $value; }
  @if $khtml   and $experimental-support-for-khtml     {  -khtml-#{$property} : $value; }
  @if $moz     and $experimental-support-for-mozilla   {    -moz-#{$property} : $value; }
  @if $ms      and $experimental-support-for-microsoft {     -ms-#{$property} : $value; }
  @if $o       and $experimental-support-for-opera     {      -o-#{$property} : $value; }
  @if $official                                        {         #{$property} : $value; }
}

// Same as experimental(), but for cases when the property is the same and the value is vendorized
@mixin experimental-value($property, $value,
  $moz      : $experimental-support-for-mozilla,
  $webkit   : $experimental-support-for-webkit,
  $o        : $experimental-support-for-opera,
  $ms       : $experimental-support-for-microsoft,
  $khtml    : $experimental-support-for-khtml,
  $official : true
) {
  @if $webkit  and $experimental-support-for-webkit    { #{$property} : -webkit-#{$value}; }
  @if $khtml   and $experimental-support-for-khtml     { #{$property} :  -khtml-#{$value}; }
  @if $moz     and $experimental-support-for-mozilla   { #{$property} :    -moz-#{$value}; }
  @if $ms      and $experimental-support-for-microsoft { #{$property} :     -ms-#{$value}; }
  @if $o       and $experimental-support-for-opera     { #{$property} :      -o-#{$value}; }
  @if $official                                        { #{$property} :         #{$value}; }
}

// To get full firefox support, you must install the ellipsis pattern:
//
//     compass install compass/ellipsis
$use-mozilla-ellipsis-binding: false !default;

// This technique, by [Justin Maxwell](http://code404.com/), was originally
// published [here](http://mattsnider.com/css/css-string-truncation-with-ellipsis/).
// Firefox implementation by [Rikkert Koppes](http://www.rikkertkoppes.com/thoughts/2008/6/).
@mixin ellipsis($no-wrap: true) {
  @if $no-wrap { white-space: nowrap; }
  overflow: hidden;
  @include experimental(text-overflow, ellipsis,
    not(-moz),
    not(-webkit),
    -o,
    -ms,
    not(-khtml),
    official
  );
  @if $experimental-support-for-mozilla and $use-mozilla-ellipsis-binding {
    -moz-binding: stylesheet-url(unquote("xml/ellipsis.xml#ellipsis"));
  }
}

// When remembering whether or not there's a hyphen in white-space is too hard
@mixin nowrap { white-space: nowrap; }

// Indicates the direction you prefer to move your text
// when hiding it.
//
// `left` is more robust, especially in older browsers.
// `right` seems have better runtime performance.
$hide-text-direction: left !default;

// Hides html text and replaces it with an image.
// If you use this on an inline element, you will need to change the display to block or inline-block.
// Also, if the size of the image differs significantly from the font size, you'll need to set the width and/or height.
//
// Parameters:
//
// * `img` -- the relative path from the project image directory to the image, or a url literal.
// * `x` -- the x position of the background image.
// * `y` -- the y position of the background image.
@mixin replace-text($img, $x: 50%, $y: 50%) {
  @include hide-text;
  background: {
    @if is-url($img) {
      image: url($img);
    } @else {
      image: image-url($img);
    }
    repeat: no-repeat;
    position: $x $y;
  };
}

// Like the `replace-text` mixin, but also sets the width
// and height of the element according the dimensions of the image.
//
// If you set `$inline` to true, then an inline image (data uri) will be used.
@mixin replace-text-with-dimensions($img, $x: 50%, $y: 50%, $inline: false) {
  @include replace-text(if($inline, inline-image($img), $img), $x, $y);
  width: image-width($img);
  height: image-height($img);
}

// Hides text in an element so you can see the background.
//
// The direction indicates how the text should be moved out of view.
//
// See `$hide-text-direction` for more information and to set this globally
// for your application.
@mixin hide-text($direction: $hide-text-direction) {
  @if $direction == left {
    $approximate-em-value: 12px;
    $wider-than-any-screen: -9999;
    text-indent: $wider-than-any-screen * $approximate-em-value;
    overflow: hidden;
    text-align: left;
  } @else {
    // slightly wider than the box prevents issues with inline-block elements
    text-indent: 110%;
    white-space: nowrap;
    overflow: hidden;
  }
}

// Hides text in an element by squishing the text into oblivion.
// Use this if you need to hide text contained in an inline element
// but still have it read by a screen reader.
@mixin squish-text {
  font: 0/0 serif;
  text-shadow: none;
  color: transparent;
}

// Prevent long urls and text from breaking layouts
// [originally from perishablepress.com](http://perishablepress.com/press/2010/06/01/wrapping-content/)
@mixin force-wrap {
  white-space: pre;           // CSS 2.0
  white-space: pre-wrap;      // CSS 2.1
  white-space: pre-line;      // CSS 3.0
  white-space: -pre-wrap;     // Opera 4-6
  white-space: -o-pre-wrap;   // Opera 7
  white-space: -moz-pre-wrap; // Mozilla
  white-space: -hp-pre-wrap;  // HP Printers
  word-wrap: break-word;      // IE 5+
}

// Usually compass hacks apply to both ie6 & 7 -- set this to false to disable support for both.
$legacy-support-for-ie: true !default;

// Setting this to false will result in smaller output, but no support for ie6 hacks
$legacy-support-for-ie6: $legacy-support-for-ie !default;

// Setting this to false will result in smaller output, but no support for ie7 hacks
$legacy-support-for-ie7: $legacy-support-for-ie !default;

// Setting this to false will result in smaller output, but no support for legacy ie8 hacks
$legacy-support-for-ie8: $legacy-support-for-ie !default;

// @private
// The user can simply set $legacy-support-for-ie and 6, 7, and 8 will be set accordingly,
// But in case the user set each of those explicitly, we need to sync the value of
// this combined variable.
$legacy-support-for-ie: $legacy-support-for-ie6 or $legacy-support-for-ie7 or $legacy-support-for-ie8;

// Whether to output legacy support for mozilla.
// Usually this means hacks to support Firefox 3.6 or earlier.
$legacy-support-for-mozilla: true;

// Support for mozilla in experimental css3 properties (-moz).
$experimental-support-for-mozilla      : true !default;
// Support for webkit in experimental css3 properties (-webkit).
$experimental-support-for-webkit       : true !default;
// Support for webkit's original (non-standard) gradient syntax.
$support-for-original-webkit-gradients : true !default;
// Support for opera in experimental css3 properties (-o).
$experimental-support-for-opera        : true !default;
// Support for microsoft in experimental css3 properties (-ms).
$experimental-support-for-microsoft    : true !default;
// Support for khtml in experimental css3 properties (-khtml).
$experimental-support-for-khtml        : false !default;
// Support for svg in experimental css3 properties.
// Setting this to true might add significant size to your
// generated stylesheets.
$experimental-support-for-svg          : false !default;
// Support for CSS PIE in experimental css3 properties (-pie).
$experimental-support-for-pie          : false !default;

// This mixin provides basic support for CSS3 properties and
// their corresponding experimental CSS2 properties when
// the implementations are identical except for the property
// prefix.
@mixin experimental($property, $value,
  $moz      : $experimental-support-for-mozilla,
  $webkit   : $experimental-support-for-webkit,
  $o        : $experimental-support-for-opera,
  $ms       : $experimental-support-for-microsoft,
  $khtml    : $experimental-support-for-khtml,
  $official : true
) {
  @if $webkit  and $experimental-support-for-webkit    { -webkit-#{$property} : $value; }
  @if $khtml   and $experimental-support-for-khtml     {  -khtml-#{$property} : $value; }
  @if $moz     and $experimental-support-for-mozilla   {    -moz-#{$property} : $value; }
  @if $ms      and $experimental-support-for-microsoft {     -ms-#{$property} : $value; }
  @if $o       and $experimental-support-for-opera     {      -o-#{$property} : $value; }
  @if $official                                        {         #{$property} : $value; }
}

// Same as experimental(), but for cases when the property is the same and the value is vendorized
@mixin experimental-value($property, $value,
  $moz      : $experimental-support-for-mozilla,
  $webkit   : $experimental-support-for-webkit,
  $o        : $experimental-support-for-opera,
  $ms       : $experimental-support-for-microsoft,
  $khtml    : $experimental-support-for-khtml,
  $official : true
) {
  @if $webkit  and $experimental-support-for-webkit    { #{$property} : -webkit-#{$value}; }
  @if $khtml   and $experimental-support-for-khtml     { #{$property} :  -khtml-#{$value}; }
  @if $moz     and $experimental-support-for-mozilla   { #{$property} :    -moz-#{$value}; }
  @if $ms      and $experimental-support-for-microsoft { #{$property} :     -ms-#{$value}; }
  @if $o       and $experimental-support-for-opera     { #{$property} :      -o-#{$value}; }
  @if $official                                        { #{$property} :         #{$value}; }
}

// Usually compass hacks apply to both ie6 & 7 -- set this to false to disable support for both.
$legacy-support-for-ie: true !default;

// Setting this to false will result in smaller output, but no support for ie6 hacks
$legacy-support-for-ie6: $legacy-support-for-ie !default;

// Setting this to false will result in smaller output, but no support for ie7 hacks
$legacy-support-for-ie7: $legacy-support-for-ie !default;

// Setting this to false will result in smaller output, but no support for legacy ie8 hacks
$legacy-support-for-ie8: $legacy-support-for-ie !default;

// @private
// The user can simply set $legacy-support-for-ie and 6, 7, and 8 will be set accordingly,
// But in case the user set each of those explicitly, we need to sync the value of
// this combined variable.
$legacy-support-for-ie: $legacy-support-for-ie6 or $legacy-support-for-ie7 or $legacy-support-for-ie8;

// Whether to output legacy support for mozilla.
// Usually this means hacks to support Firefox 3.6 or earlier.
$legacy-support-for-mozilla: true;

// Support for mozilla in experimental css3 properties (-moz).
$experimental-support-for-mozilla      : true !default;
// Support for webkit in experimental css3 properties (-webkit).
$experimental-support-for-webkit       : true !default;
// Support for webkit's original (non-standard) gradient syntax.
$support-for-original-webkit-gradients : true !default;
// Support for opera in experimental css3 properties (-o).
$experimental-support-for-opera        : true !default;
// Support for microsoft in experimental css3 properties (-ms).
$experimental-support-for-microsoft    : true !default;
// Support for khtml in experimental css3 properties (-khtml).
$experimental-support-for-khtml        : false !default;
// Support for svg in experimental css3 properties.
// Setting this to true might add significant size to your
// generated stylesheets.
$experimental-support-for-svg          : false !default;
// Support for CSS PIE in experimental css3 properties (-pie).
$experimental-support-for-pie          : false !default;

// The `zoom` approach generates less CSS but does not validate.
// Set this to `block` to use the display-property to hack the
// element to gain layout.
$default-has-layout-approach: zoom !default;

// This mixin causes an element matching the selector
// to gain the "hasLayout" property in internet explorer.
// More information on [hasLayout](http://reference.sitepoint.com/css/haslayout).
@mixin has-layout($approach: $default-has-layout-approach) {
  @if $legacy-support-for-ie {
    @if $approach == zoom {
      @include has-layout-zoom;
    } @else if $approach == block {
      @include has-layout-block;
    } @else {
      @warn "Unknown has-layout approach: #{$approach}";
      @include has-layout-zoom;
    }
  }
}

@mixin has-layout-zoom {
  @if $legacy-support-for-ie6 or $legacy-support-for-ie7 {
    *zoom: 1;
  }
}

@mixin has-layout-block {
  @if $legacy-support-for-ie {
    // This makes ie6 get layout
    display: inline-block;
    // and this puts it back to block
    & { display: block; }
  }
}

// A hack to supply IE6 (and below) with a different property value.
// [Read more](http://www.cssportal.com/css-hacks/#in_css-important).
@mixin bang-hack($property, $value, $ie6-value) {
  @if $legacy-support-for-ie6 {
    #{$property}: #{$value} !important;
    #{$property}: #{$ie6-value};
  }
}

//
// A partial implementation of the Ruby list functions from Compass:
// https://github.com/Compass/compass/blob/stable/lib/compass/sass_extensions/functions/lists.rb
//


// compact is part of libsass

@function -compass-nth($list, $place) {
  // Yep, Sass-lists are 1-indexed.
  @if $place == "first" {
    $place: 1;
  }
  @if $place == "last" {
    $place: length($list);
  }
  @return nth($list, $place);
}

// compass_list can't be implemented in sass script

@function -compass-space-list($item1, $item2:null, $item3:null, $item4:null, $item5:null, $item6:null, $item7:null, $item8:null, $item9:null) {
  $items: ();
  // Support for polymorphism.
  @if type-of($item1) == 'list' {
    // Passing a single array of properties.
    $items: $item1;
  } @else {
    $items: $item1 $item2 $item3 $item4 $item5 $item6 $item7 $item8 $item9;
  }

  $full: first-value-of($items);

  @for $i from 2 through length($items) {
    $item: nth($items, $i);
    @if $item != null {
      $full: $full $item;
    }
  }

  @return $full;
}

@function -compass-list-size($list) {
  @return length($list);
}

@function -compass-slice($list, $start, $end: false) {
  @if $end == false {
    $end: length($list);
  }
  $full: nth($list, $start);
  @for $i from $start + 1 through $end {
    $full: $full, nth($list, $i);
  }
  @return $full;
}

@function reject($list, $reject1, $reject2:null, $reject3:null, $reject4:null, $reject5:null, $reject6:null, $reject7:null, $reject8:null, $reject9:null) {
  $rejects: $reject1, $reject2, $reject3, $reject4, $reject5, $reject6, $reject7, $reject8, $reject9;

  $full: false;
  @each $item in $list {
    @if index($rejects, $item) {}
    @else {
      @if $full {
        $full: $full, $item;
      }
      @else {
        $full: $item;
      }
    }
  }
  @return $full;
}

@function first-value-of($list) {
  @return nth($list, 1);
}

@function compact($vars...) {
  $separator: list-separator($vars);
  $list: ();
  @each $var in $vars {
      @if $var {
          $list: append($list, $var, $separator);
      }
  }
  @return $list;
}

// 
// A partial implementation of the Ruby cross browser support functions from Compass:
// https://github.com/Compass/compass/blob/stable/lib/compass/sass_extensions/functions/cross_browser_support.rb
// 

@function prefixed($prefix, $property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
  $properties: $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9;
  $prefixed: false;
  @each $item in $properties {
    @if type-of($item) == 'string' {
      $prefixed: $prefixed or str-index($item, 'url') != 1 and str-index($item, 'rgb') != 1 and str-index($item, '#') != 1;
    } @elseif type-of($item) == 'color' {
    } @elseif $item != null {
      $prefixed: true;
    }
  }
  @return $prefixed;
}

@function prefix($prefix, $property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
  $properties: "";

  // Support for polymorphism.
  @if type-of($property1) == 'list' {
    // Passing a single array of properties.
    $properties: $property1;
  } @else {
    // Passing multiple properties.
    $properties: $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9;
  }

  $props: false;
  @each $item in $properties {
    @if $item == null {}
    @else {
      @if prefixed($prefix, $item) {
        $item: #{$prefix}-#{$item};
      }
      @if $props {
        $props: $props, $item;
      }
      @else {
        $props: $item;
      }
    }
  }
  @return $props;
}

@function -svg($property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
  @return prefix('-svg', $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9);
}

@function -owg($property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
  @return prefix('-owg', $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9);
}

@function -webkit($property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
  @return prefix('-webkit', $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9);
}

@function -moz($property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
  @return prefix('-moz', $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9);
}

@function -o($property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
  @return prefix('-o', $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9);
}

@function -pie($property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
  @return prefix('-pie', $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9);
}

// 
// A partial implementation of the Ruby gradient support functions from Compass:
// https://github.com/Compass/compass/blob/v0.12.2/lib/compass/sass_extensions/functions/gradient_support.rb
// 

@function color-stops($item1, $item2:null, $item3:null, $item4:null, $item5:null, $item6:null, $item7:null, $item8:null, $item9:null) {
  $items: $item2, $item3, $item4, $item5, $item6, $item7, $item8, $item9;
  $full: $item1;
  @each $item in $items {
    @if $item != null {
      $full: $full, $item;
    }    
  }
  @return $full;
}
// 
// A partial implementation of the Ruby constants functions from Compass:
// https://github.com/Compass/compass/blob/stable/lib/compass/sass_extensions/functions/constants.rb
// 

@function opposite-position($from) {
    @if ($from == top) {
        @return bottom;
    } @else if ($from == bottom) {
        @return top;
    } @else if ($from == left) {
        @return right;
    } @else if ($from == right) {
        @return left;
    } @else if ($from == center) {
        @return center;
    }
}

// 
// A partial implementation of the Ruby display functions from Compass:
// https://github.com/Compass/compass/blob/stable/core/lib/compass/core/sass_extensions/functions/display.rb
// 

@function elements-of-type($type){
    @if ($type == block){
        @return address, article, aside, blockquote, center, dir, div, dd, details, dl, dt, fieldset, figcaption, figure, form, footer, frameset, h1, h2, h3, h4, h5, h6, hr, header, hgroup, isindex, main, menu, nav, noframes, noscript, ol, p, pre, section, summary, ul;
    } @else if ($type == inline){
        @return a, abbr, acronym, audio, b, basefont, bdo, big, br, canvas, cite, code, command, datalist, dfn, em, embed, font, i, img, input, keygen, kbd, label, mark, meter, output, progress, q, rp, rt, ruby, s, samp, select, small, span, strike, strong, sub, sup, textarea, time, tt, u, var, video, wbr;
    } @else if ($type == inline-block){
        @return img;
    } @else if ($type == table){
        @return table;
    } @else if ($type == list-item){
        @return li;
    } @else if ($type == table-row-group){
        @return tbody;
    } @else if ($type == table-header-group){
        @return thead;
    } @else if ($type == table-footer-group){
        @return tfoot;
    } @else if ($type == table-row){
        @return tr;
    } @else if ($type == table-cell){
        @return th, td;
    } @else if ($type == html5-block){
        @return article, aside, details, figcaption, figure, footer, header, hgroup, main, menu, nav, section, summary;
    } @else if ($type == html5-inline){
        @return audio, canvas, command, datalist, embed, keygen, mark, meter, output, progress, rp, rt, ruby, time, video, wbr;
    } @else if ($type == html5){
        @return article, aside, audio, canvas, command, datalist, details, embed, figcaption, figure, footer, header, hgroup, keygen, main, mark, menu, meter, nav, output, progress, rp, rt, ruby, section, summary, time, video, wbr;
    } @else if ($type == text-input){
        @return input, textarea;
    }
}

// 
// A partial implementation of the Ruby colors functions from Compass:
// https://github.com/Compass/compass/blob/stable/core/lib/compass/core/sass_extensions/functions/colors.rb
//

// a genericized version of lighten/darken so that negative values can be used.
@function adjust-lightness($color, $amount) {
    @return adjust-color($color, $lightness: $amount);
}

// Scales a color's lightness by some percentage.
// If the amount is negative, the color is scaled darker, if positive, it is scaled lighter.
// This will never return a pure light or dark color unless the amount is 100%.
@function scale-lightness($color, $amount) {
    @return scale-color($color, $lightness: $amount);
}

// a genericized version of saturate/desaturate so that negative values can be used.
@function adjust-saturation($color, $amount) {
    @return adjust-color($color, $saturation: $amount);
}

// Scales a color's saturation by some percentage.
// If the amount is negative, the color is desaturated, if positive, it is saturated.
// This will never return a pure saturated or desaturated color unless the amount is 100%.
@function scale-saturation($color, $amount) {
    @return scale-color($color, $saturation: $amount);
}

@function shade($color, $percentage) {
    @return mix(#000000, $color, $percentage);
}

@function tint($color, $percentage) {
    @return mix(#ffffff, $color, $percentage);
}


// Background property support for vendor prefixing within values.
@mixin background(
  $background-1,
  $background-2: false,
  $background-3: false,
  $background-4: false,
  $background-5: false,
  $background-6: false,
  $background-7: false,
  $background-8: false,
  $background-9: false,
  $background-10: false
) {
  $backgrounds: compact($background-1, $background-2, $background-3, $background-4, $background-5,
                        $background-6, $background-7, $background-8, $background-9, $background-10);
  $mult-bgs: -compass-list-size($backgrounds) > 1;
  $add-pie-bg: prefixed(-pie,   $backgrounds) or $mult-bgs;
  @if $experimental-support-for-svg          and prefixed(-svg,    $backgrounds) {      background:    -svg($backgrounds); }
  @if $support-for-original-webkit-gradients and prefixed(-owg,    $backgrounds) {      background:    -owg($backgrounds); }
  @if $experimental-support-for-webkit       and prefixed(-webkit, $backgrounds) {      background: -webkit($backgrounds); }
  @if $experimental-support-for-mozilla      and prefixed(-moz,    $backgrounds) {      background:    -moz($backgrounds); }
  @if $experimental-support-for-opera        and prefixed(-o,      $backgrounds) {      background:      -o($backgrounds); }
  @if $experimental-support-for-pie          and $add-pie-bg                     { -pie-background:    -pie($backgrounds); }
                                                                                        background:         $backgrounds ;
}

@mixin background-with-css2-fallback(
  $background-1,
  $background-2: false,
  $background-3: false,
  $background-4: false,
  $background-5: false,
  $background-6: false,
  $background-7: false,
  $background-8: false,
  $background-9: false,
  $background-10: false
) {
  $backgrounds: compact($background-1, $background-2, $background-3, $background-4, $background-5,
                        $background-6, $background-7, $background-8, $background-9, $background-10);
  $mult-bgs: -compass-list-size($backgrounds) > 1;
  $simple-background: if($mult-bgs or prefixed(-css2, $backgrounds), -css2(-compass-nth($backgrounds, last)), false);
  @if not(blank($simple-background)) { background: $simple-background; }
  @include background($background-1, $background-2, $background-3, $background-4, $background-5,
                      $background-6, $background-7, $background-8, $background-9, $background-10);
}


// Background image property support for vendor prefixing within values.
@mixin background-image(
  $image-1,
  $image-2: false,
  $image-3: false,
  $image-4: false,
  $image-5: false,
  $image-6: false,
  $image-7: false,
  $image-8: false,
  $image-9: false,
  $image-10: false
) {
  $images: compact($image-1, $image-2, $image-3, $image-4, $image-5, $image-6, $image-7, $image-8, $image-9, $image-10);
  $add-pie-bg: prefixed(-pie,   $images) or -compass-list-size($images) > 1;

  @if $experimental-support-for-svg          and prefixed(-svg,    $images) { background-image:    -svg($images); background-size: 100%; }
  @if $support-for-original-webkit-gradients and prefixed(-owg,    $images) { background-image:    -owg($images); }
  @if $experimental-support-for-webkit       and prefixed(-webkit, $images) { background-image: -webkit($images); }
  @if $experimental-support-for-mozilla      and prefixed(-moz,    $images) { background-image:    -moz($images); }
  @if $experimental-support-for-opera        and prefixed(-o,      $images) { background-image:      -o($images); }
  @if $experimental-support-for-pie          and $add-pie-bg                { @warn "PIE does not support background-image. Use @include background(#{$images}) instead." }
                                                                              background-image:         $images ;
}

// Emit a IE-Specific filters that renders a simple linear gradient.
// For use in IE 6 - 8. Best practice would have you apply this via a
// conditional IE stylesheet, but if you must, you should place this before
// any background-image properties that you have specified.
//
// For the `$orientation` parameter, you can pass `vertical` or `horizontal`.
@mixin filter-gradient($start-color, $end-color, $orientation: vertical) {
  @include has-layout;
  $gradient-type: if($orientation == vertical, 0, 1);
  @if $legacy-support-for-ie6 or $legacy-support-for-ie7 or $legacy-support-for-ie8 {
    filter: progid:DXImageTransform.Microsoft.gradient(gradientType=#{$gradient-type}, startColorstr='#{ie-hex-str($start-color)}', endColorstr='#{ie-hex-str($end-color)}');
  }
}


// Border image property support for vendor prefixing properties and values.
@mixin border-image($value) {
  @if $experimental-support-for-mozilla      {    -moz-border-image:    -moz(reject(-compass-list($value), fill)); }
  @if $support-for-original-webkit-gradients { -webkit-border-image:    -owg(reject(-compass-list($value), fill)); }
  @if $experimental-support-for-webkit       { -webkit-border-image: -webkit(reject(-compass-list($value), fill)); }
  @if $experimental-support-for-opera        {      -o-border-image:      -o(reject(-compass-list($value), fill)); }
  @if $experimental-support-for-svg          {         border-image:    -svg(reject(-compass-list($value), fill)); }
                                                       border-image:                              $value;
}

// List style image property support for vendor prefixing within values.
@mixin list-style-image($image) {
  @if $experimental-support-for-mozilla      and prefixed(-moz,    $image) { list-style-image:    -moz($image); }
  @if $support-for-original-webkit-gradients and prefixed(-owg,    $image) { list-style-image:    -owg($image); }
  @if $experimental-support-for-webkit       and prefixed(-webkit, $image) { list-style-image: -webkit($image); }
  @if $experimental-support-for-opera        and prefixed(-o,      $image) { list-style-image:      -o($image); }
  @if $experimental-support-for-svg          and prefixed(-svg,    $image) { list-style-image:    -svg($image); }
                                                                             list-style-image:         $image ;
}

// List style property support for vendor prefixing within values.
@mixin list-style($value) {
  $value: -compass-list($value);
  @if $experimental-support-for-mozilla      and prefixed(-moz,    $value) { list-style-image:    -moz($value); }
  @if $support-for-original-webkit-gradients and prefixed(-owg,    $value) { list-style-image:    -owg($value); }
  @if $experimental-support-for-webkit       and prefixed(-webkit, $value) { list-style-image: -webkit($value); }
  @if $experimental-support-for-opera        and prefixed(-o,      $value) { list-style-image:      -o($value); }
  @if $experimental-support-for-svg          and prefixed(-svg,    $value) { list-style-image:    -svg($value); }
                                                                             list-style-image:         $value ;
}

// content property support for vendor prefixing within values.
@mixin content($value) {
  $value: -compass-list($value);
  @if $experimental-support-for-mozilla      and prefixed(-moz,    $value) { content:    -moz($value); }
  @if $support-for-original-webkit-gradients and prefixed(-owg,    $value) { content:    -owg($value); }
  @if $experimental-support-for-webkit       and prefixed(-webkit, $value) { content: -webkit($value); }
  @if $experimental-support-for-opera        and prefixed(-o,      $value) { content:      -o($value); }
  @if $experimental-support-for-svg          and prefixed(-svg,    $value) { content:    -svg($value); }
                                                                             content:         $value ;
}

// Usually compass hacks apply to both ie6 & 7 -- set this to false to disable support for both.
$legacy-support-for-ie: true !default;

// Setting this to false will result in smaller output, but no support for ie6 hacks
$legacy-support-for-ie6: $legacy-support-for-ie !default;

// Setting this to false will result in smaller output, but no support for ie7 hacks
$legacy-support-for-ie7: $legacy-support-for-ie !default;

// Setting this to false will result in smaller output, but no support for legacy ie8 hacks
$legacy-support-for-ie8: $legacy-support-for-ie !default;

// @private
// The user can simply set $legacy-support-for-ie and 6, 7, and 8 will be set accordingly,
// But in case the user set each of those explicitly, we need to sync the value of
// this combined variable.
$legacy-support-for-ie: $legacy-support-for-ie6 or $legacy-support-for-ie7 or $legacy-support-for-ie8;

// Whether to output legacy support for mozilla.
// Usually this means hacks to support Firefox 3.6 or earlier.
$legacy-support-for-mozilla: true;

// Support for mozilla in experimental css3 properties (-moz).
$experimental-support-for-mozilla      : true !default;
// Support for webkit in experimental css3 properties (-webkit).
$experimental-support-for-webkit       : true !default;
// Support for webkit's original (non-standard) gradient syntax.
$support-for-original-webkit-gradients : true !default;
// Support for opera in experimental css3 properties (-o).
$experimental-support-for-opera        : true !default;
// Support for microsoft in experimental css3 properties (-ms).
$experimental-support-for-microsoft    : true !default;
// Support for khtml in experimental css3 properties (-khtml).
$experimental-support-for-khtml        : false !default;
// Support for svg in experimental css3 properties.
// Setting this to true might add significant size to your
// generated stylesheets.
$experimental-support-for-svg          : false !default;
// Support for CSS PIE in experimental css3 properties (-pie).
$experimental-support-for-pie          : false !default;

// This mixin provides basic support for CSS3 properties and
// their corresponding experimental CSS2 properties when
// the implementations are identical except for the property
// prefix.
@mixin experimental($property, $value,
  $moz      : $experimental-support-for-mozilla,
  $webkit   : $experimental-support-for-webkit,
  $o        : $experimental-support-for-opera,
  $ms       : $experimental-support-for-microsoft,
  $khtml    : $experimental-support-for-khtml,
  $official : true
) {
  @if $webkit  and $experimental-support-for-webkit    { -webkit-#{$property} : $value; }
  @if $khtml   and $experimental-support-for-khtml     {  -khtml-#{$property} : $value; }
  @if $moz     and $experimental-support-for-mozilla   {    -moz-#{$property} : $value; }
  @if $ms      and $experimental-support-for-microsoft {     -ms-#{$property} : $value; }
  @if $o       and $experimental-support-for-opera     {      -o-#{$property} : $value; }
  @if $official                                        {         #{$property} : $value; }
}

// Same as experimental(), but for cases when the property is the same and the value is vendorized
@mixin experimental-value($property, $value,
  $moz      : $experimental-support-for-mozilla,
  $webkit   : $experimental-support-for-webkit,
  $o        : $experimental-support-for-opera,
  $ms       : $experimental-support-for-microsoft,
  $khtml    : $experimental-support-for-khtml,
  $official : true
) {
  @if $webkit  and $experimental-support-for-webkit    { #{$property} : -webkit-#{$value}; }
  @if $khtml   and $experimental-support-for-khtml     { #{$property} :  -khtml-#{$value}; }
  @if $moz     and $experimental-support-for-mozilla   { #{$property} :    -moz-#{$value}; }
  @if $ms      and $experimental-support-for-microsoft { #{$property} :     -ms-#{$value}; }
  @if $o       and $experimental-support-for-opera     { #{$property} :      -o-#{$value}; }
  @if $official                                        { #{$property} :         #{$value}; }
}

//  override to change the default
$default-background-size: 100% auto !default;

// Set the size of background images using px, width and height, or percentages.
// Currently supported in: Opera, Gecko, Webkit.
//
// * percentages are relative to the background-origin (default = padding-box)
// * mixin defaults to: `$default-background-size`
@mixin background-size(
  $size-1: $default-background-size,
  $size-2: false,
  $size-3: false,
  $size-4: false,
  $size-5: false,
  $size-6: false,
  $size-7: false,
  $size-8: false,
  $size-9: false,
  $size-10: false
) {
  $size-1: if(type-of($size-1) == string, unquote($size-1), $size-1);
  $sizes: compact($size-1, $size-2, $size-3, $size-4, $size-5, $size-6, $size-7, $size-8, $size-9, $size-10);
  @include experimental(background-size, $sizes, -moz, -webkit, -o, not(-ms), not(-khtml));
}

// Set the color of your columns
$grid-background-column-color     : rgba(100, 100, 225, 0.25)   !default;
// Set the color of your gutters
$grid-background-gutter-color     : rgba(0, 0, 0, 0)            !default;

// Set the total number of columns in your grid
$grid-background-total-columns    : 24                          !default;
// Set the width of your columns
$grid-background-column-width     : 30px                        !default;
// Set the width of your gutters
$grid-background-gutter-width     : 10px                        !default;
// Set the offset, if your columns are padded in from the container edge
$grid-background-offset           : 0px                         !default;

// Set the color of your baseline
$grid-background-baseline-color   : rgba(0, 0, 0, 0.5)          !default;
// Set the height of your baseline grid
$grid-background-baseline-height  : 1.5em                       !default;

// toggle your columns grids on and off
$show-column-grid-backgrounds     : true                        !default;
// toggle your vertical grids on and off
$show-baseline-grid-backgrounds   : true                        !default;
// toggle all your grids on and off
$show-grid-backgrounds            : true                        !default;

// optionally force your grid-image to remain fluid
// no matter what units you used to declared your grid.
$grid-background-force-fluid      : false                       !default;


// Create the gradient needed for baseline grids
@function get-baseline-gradient(
  $color : $grid-background-baseline-color
) {
  $gradient: linear-gradient(bottom, $color 5%, rgba($color,0) 5%);
  @return $gradient;
}

// Create the color-stops needed for horizontal grids
@function build-grid-background(
  $total          : $grid-background-total-columns,
  $column         : $grid-background-column-width,
  $gutter         : $grid-background-gutter-width,
  $offset         : $grid-background-offset,
  $column-color   : $grid-background-column-color,
  $gutter-color   : $grid-background-gutter-color
) {
  $grid: compact();
  $grid: append($grid, $gutter-color $offset, comma);
  @for $i from 0 to $total {

    // $a represents the start of this column, initially equal to the offset
    $a: $offset;
    @if $i > 0 { $a: $a + (($column + $gutter) * $i); }

    // $g represents the start of this gutter, equal to $a plus one column-width
    $g: $a + $column;

    // $z represents the end of a gutter, equal to $g plus one gutter-width
    $z: $g + $gutter;

    @if (unit($a) == "%") and ($i == ($total - 1)) {
      $z: 100%;
    }

    // and we add this column/gutter pair to our grid
    $grid: join($grid, ($column-color $a, $column-color $g, $gutter-color $g, $gutter-color $z));
  }

  @return $grid;
}

// Return the gradient needed for horizontal grids
@function get-column-gradient(
  $total          : $grid-background-total-columns,
  $column         : $grid-background-column-width,
  $gutter         : $grid-background-gutter-width,
  $offset         : $grid-background-offset,
  $column-color   : $grid-background-column-color,
  $gutter-color   : $grid-background-gutter-color,
  $force-fluid    : $grid-background-force-fluid
) {
  $grid: unquote("");

  // don't force fluid grids when they are already fluid.
  @if unit($column) == "%" { $force-fluid: false; }

  @if $force-fluid {
    $grid: get-column-fluid-grid($total,$column,$gutter,$offset,$column-color,$gutter-color);
  } @else {
    $grid: build-grid-background($total,$column,$gutter,$offset,$column-color,$gutter-color);
  }

  // return the horizontal grid as a gradient
  $gradient: linear-gradient(left, $grid);
  @return $gradient;
}

// Convert a grid from fixed units into percentages.
@function get-column-fluid-grid(
  $total          : $grid-background-total-columns,
  $column         : $grid-background-column-width,
  $gutter         : $grid-background-gutter-width,
  $offset         : $grid-background-offset,
  $column-color   : $grid-background-column-color,
  $gutter-color   : $grid-background-gutter-color
) {
  $context: ($column * $total) + ($gutter * ($total - 1) + ($offset * 2));
  $offset: $offset / $context * 100%;
  $column: $column / $context * 100%;
  $gutter: $gutter / $context * 100%;

  // return the horizontal grid as a set of color-stops
  $grid: build-grid-background($total,$column,$gutter,$offset,$column-color,$gutter-color);
  @return $grid;
}


// Add just the baseline grid to an element's background
@mixin baseline-grid-background(
  $baseline : $grid-background-baseline-height,
  $color    : $grid-background-baseline-color
) {
  @if $show-grid-backgrounds and $show-baseline-grid-backgrounds {
    @include background-image(get-baseline-gradient($color));
    @include background-size(100% $baseline);
    background-position: left top;
  }
}

// Add just the horizontal grid to an element's background
@mixin column-grid-background(
  $total          : $grid-background-total-columns,
  $column         : $grid-background-column-width,
  $gutter         : $grid-background-gutter-width,
  $offset         : $grid-background-offset,
  $column-color   : $grid-background-column-color,
  $gutter-color   : $grid-background-gutter-color,
  $force-fluid    : $grid-background-force-fluid
) {
  @if $show-grid-backgrounds and $show-column-grid-backgrounds {
    @include background-image(
      get-column-gradient($total,$column,$gutter,$offset,$column-color,$gutter-color, $force-fluid)
    );
    background-position: left top;
  }
}

// Add both horizontal and baseline grids to an element's background
@mixin grid-background(
  $total          : $grid-background-total-columns,
  $column         : $grid-background-column-width,
  $gutter         : $grid-background-gutter-width,
  $baseline       : $grid-background-baseline-height,
  $offset         : $grid-background-offset,
  $column-color   : $grid-background-column-color,
  $gutter-color   : $grid-background-gutter-color,
  $baseline-color : $grid-background-baseline-color,
  $force-fluid    : $grid-background-force-fluid
) {
  @if $show-grid-backgrounds {
    @if $show-baseline-grid-backgrounds and $show-column-grid-backgrounds {
      @include background-image(
        get-baseline-gradient($baseline-color),
        get-column-gradient($total,$column,$gutter,$offset,$column-color,$gutter-color, $force-fluid)
      );
      @include background-size(100% $baseline, auto);
      background-position: left top;
    } @else {
      @include baseline-grid-background($baseline, $baseline-color);
      @include column-grid-background($total,$column,$gutter,$offset,$column-color,$gutter-color, $force-fluid);
    }
  }
}

// The base font size.
$base-font-size: 16px !default;

// The base line height determines the basic unit of vertical rhythm.
$base-line-height: 24px !default;

// Set the default border style for rhythm borders.
$default-rhythm-border-style: solid !default;

// The default font size in all browsers.
$browser-default-font-size: 16px;

// Set to false if you want to use absolute pixels in sizing your typography.
$relative-font-sizing: true !default;

// Allows the `adjust-font-size-to` mixin and the `lines-for-font-size` function
// to round the line height to the nearest half line height instead of the
// nearest integral line height to avoid large spacing between lines.
$round-to-nearest-half-line: false !default;

// Ensure there is at least this many pixels
// of vertical padding above and below the text.
$min-line-padding: 2px !default;

// $base-font-size but in your output unit of choice.
// Defaults to 1em when `$relative-font-sizing` is true.
$font-unit: if($relative-font-sizing, 1em, $base-font-size) !default;

// The basic unit of font rhythm.
$base-rhythm-unit: $base-line-height / $base-font-size * $font-unit;

// The leader is the amount of whitespace in a line.
// It might be useful in your calculations.
$base-leader: ($base-line-height - $base-font-size) * $font-unit / $base-font-size;

// The half-leader is the amount of whitespace above and below a line.
// It might be useful in your calculations.
$base-half-leader: $base-leader / 2;

// True if a number has a relative unit.
@function relative-unit($number) {
  @return unit($number) == "%" or unit($number) == "em" or unit($number) == "rem"
}

// True if a number has an absolute unit.
@function absolute-unit($number) {
  @return not(relative-unit($number) or unitless($number));
}

@if $relative-font-sizing and not(relative-unit($font-unit)) {
  @warn "$relative-font-sizing is true but $font-unit is set to #{$font-unit} which is not a relative unit.";
}

// Establishes a font baseline for the given font-size.
@mixin establish-baseline($font-size: $base-font-size) {
  // IE 6 refuses to resize fonts set in pixels and it weirdly resizes fonts
  // whose root is set in ems. So we set the root font size in percentages of
  // the default font size.
  * html {
    font-size: 100% * ($font-size / $browser-default-font-size);
  }
  html {
    font-size: $font-size;
    @include adjust-leading-to(1, if($relative-font-sizing, $font-size, $base-font-size));
  }
}

// Resets the line-height to 1 vertical rhythm unit.
// Does not work on elements whose font-size is different from $base-font-size.
//
// @deprecated This mixin will be removed in the next release.
// Please use the `adjust-leading-to` mixin instead.
@mixin reset-baseline {
  @include adjust-leading-to(1, if($relative-font-sizing, $base-font-size, $base-font-size));
}

// Show a background image that can be used to debug your alignments.
// Include the $img argument if you would rather use your own image than the
// Compass default gradient image.
@mixin debug-vertical-alignment($img: false) {
  @if $img {
    background: image-url($img);
  } @else {
    @include baseline-grid-background($base-rhythm-unit);
  }
}

// Adjust a block to have a different font size and line height to maintain the
// rhythm. $lines specifies how many multiples of the baseline rhythm each line
// of this font should use up. It does not have to be an integer, but it
// defaults to the smallest integer that is large enough to fit the font.
// Use $from-size to adjust from a font-size other than the base font-size.
@mixin adjust-font-size-to($to-size, $lines: lines-for-font-size($to-size), $from-size: $base-font-size) {
  @if not($relative-font-sizing) and $from-size != $base-font-size {
    @warn "$relative-font-sizing is false but a relative font size was passed to adjust-font-size-to";
  }
  font-size: $font-unit * $to-size / $from-size;
  @include adjust-leading-to($lines, if($relative-font-sizing, $to-size, $base-font-size));
}

// Adjust a block to have different line height to maintain the rhythm.
// $lines specifies how many multiples of the baseline rhythm each line of this
// font should use up. It does not have to be an integer, but it defaults to the
// smallest integer that is large enough to fit the font.
@mixin adjust-leading-to($lines, $font-size: $base-font-size) {
  line-height: rhythm($lines, $font-size);
}

// Calculate rhythm units.
@function rhythm(
  $lines: 1,
  $font-size: $base-font-size,
  $offset: 0
) {
  @if not($relative-font-sizing) and $font-size != $base-font-size {
    @warn "$relative-font-sizing is false but a relative font size was passed to the rhythm function";
  }
  $rhythm: $font-unit * ($lines * $base-line-height - $offset) / $font-size;
  // Round the pixels down to nearest integer.
  @if unit($rhythm) == px {
    $rhythm: floor($rhythm);
  }
  @return $rhythm;
}

// Calculate the minimum multiple of rhythm units needed to contain the font-size.
@function lines-for-font-size($font-size) {
  $lines: if($round-to-nearest-half-line,
              ceil(2 * $font-size / $base-line-height) / 2,
              ceil($font-size / $base-line-height));
  @if $lines * $base-line-height - $font-size < $min-line-padding * 2 {
    $lines: $lines + if($round-to-nearest-half-line, 0.5, 1);
  }
  @return $lines;
}

// Apply leading whitespace. The $property can be margin or padding.
@mixin leader($lines: 1, $font-size: $base-font-size, $property: margin) {
  #{$property}-top: rhythm($lines, $font-size);
}

// Apply leading whitespace as padding.
@mixin padding-leader($lines: 1, $font-size: $base-font-size) {
  padding-top: rhythm($lines, $font-size);
}

// Apply leading whitespace as margin.
@mixin margin-leader($lines: 1, $font-size: $base-font-size) {
  margin-top: rhythm($lines, $font-size);
}

// Apply trailing whitespace. The $property can be margin or padding.
@mixin trailer($lines: 1, $font-size: $base-font-size, $property: margin) {
  #{$property}-bottom: rhythm($lines, $font-size);
}

// Apply trailing whitespace as padding.
@mixin padding-trailer($lines: 1, $font-size: $base-font-size) {
  padding-bottom: rhythm($lines, $font-size);
}

// Apply trailing whitespace as margin.
@mixin margin-trailer($lines: 1, $font-size: $base-font-size) {
  margin-bottom: rhythm($lines, $font-size);
}

// Shorthand mixin to apply whitespace for top and bottom margins and padding.
@mixin rhythm($leader: 0, $padding-leader: 0, $padding-trailer: 0, $trailer: 0, $font-size: $base-font-size) {
  @include leader($leader, $font-size);
  @include padding-leader($padding-leader, $font-size);
  @include padding-trailer($padding-trailer, $font-size);
  @include trailer($trailer, $font-size);
}

// Apply a border and whitespace to any side without destroying the vertical
// rhythm. The whitespace must be greater than the width of the border.
@mixin apply-side-rhythm-border($side, $width: 1px, $lines: 1, $font-size: $base-font-size, $border-style: $default-rhythm-border-style) {
  @if not($relative-font-sizing) and $font-size != $base-font-size {
    @warn "$relative-font-sizing is false but a relative font size was passed to apply-side-rhythm-border";
  }
  border-#{$side}-style: $border-style;
  border-#{$side}-width: $font-unit * $width / $font-size;
  padding-#{$side}: rhythm($lines, $font-size, $offset: $width);
}

// Apply borders and whitespace equally to all sides.
@mixin rhythm-borders($width: 1px, $lines: 1, $font-size: $base-font-size, $border-style: $default-rhythm-border-style) {
  @if not($relative-font-sizing) and $font-size != $base-font-size {
    @warn "$relative-font-sizing is false but a relative font size was passed to rhythm-borders";
  }
  border: {
    style: $border-style;
    width: $font-unit * $width / $font-size;
  };
  padding: rhythm($lines, $font-size, $offset: $width);
}

// Apply a leading border.
@mixin leading-border($width: 1px, $lines: 1, $font-size: $base-font-size, $border-style: $default-rhythm-border-style) {
  @include apply-side-rhythm-border(top, $width, $lines, $font-size, $border-style);
}

// Apply a trailing border.
@mixin trailing-border($width: 1px, $lines: 1, $font-size: $base-font-size, $border-style: $default-rhythm-border-style) {
  @include apply-side-rhythm-border(bottom, $width, $lines, $font-size, $border-style);
}

// Apply both leading and trailing borders.
@mixin horizontal-borders($width: 1px, $lines: 1, $font-size: $base-font-size, $border-style: $default-rhythm-border-style) {
  @include leading-border($width, $lines, $font-size, $border-style);
  @include trailing-border($width, $lines, $font-size, $border-style);
}

// Alias for `horizontal-borders` mixin.
@mixin h-borders($width: 1px, $lines: 1, $font-size: $base-font-size, $border-style: $default-rhythm-border-style) {
  @include horizontal-borders($width, $lines, $font-size, $border-style);
}

// Usually compass hacks apply to both ie6 & 7 -- set this to false to disable support for both.
$legacy-support-for-ie: true !default;

// Setting this to false will result in smaller output, but no support for ie6 hacks
$legacy-support-for-ie6: $legacy-support-for-ie !default;

// Setting this to false will result in smaller output, but no support for ie7 hacks
$legacy-support-for-ie7: $legacy-support-for-ie !default;

// Setting this to false will result in smaller output, but no support for legacy ie8 hacks
$legacy-support-for-ie8: $legacy-support-for-ie !default;

// @private
// The user can simply set $legacy-support-for-ie and 6, 7, and 8 will be set accordingly,
// But in case the user set each of those explicitly, we need to sync the value of
// this combined variable.
$legacy-support-for-ie: $legacy-support-for-ie6 or $legacy-support-for-ie7 or $legacy-support-for-ie8;

// Whether to output legacy support for mozilla.
// Usually this means hacks to support Firefox 3.6 or earlier.
$legacy-support-for-mozilla: true;

// Support for mozilla in experimental css3 properties (-moz).
$experimental-support-for-mozilla      : true !default;
// Support for webkit in experimental css3 properties (-webkit).
$experimental-support-for-webkit       : true !default;
// Support for webkit's original (non-standard) gradient syntax.
$support-for-original-webkit-gradients : true !default;
// Support for opera in experimental css3 properties (-o).
$experimental-support-for-opera        : true !default;
// Support for microsoft in experimental css3 properties (-ms).
$experimental-support-for-microsoft    : true !default;
// Support for khtml in experimental css3 properties (-khtml).
$experimental-support-for-khtml        : false !default;
// Support for svg in experimental css3 properties.
// Setting this to true might add significant size to your
// generated stylesheets.
$experimental-support-for-svg          : false !default;
// Support for CSS PIE in experimental css3 properties (-pie).
$experimental-support-for-pie          : false !default;

// This mixin provides basic support for CSS3 properties and
// their corresponding experimental CSS2 properties when
// the implementations are identical except for the property
// prefix.
@mixin experimental($property, $value,
  $moz      : $experimental-support-for-mozilla,
  $webkit   : $experimental-support-for-webkit,
  $o        : $experimental-support-for-opera,
  $ms       : $experimental-support-for-microsoft,
  $khtml    : $experimental-support-for-khtml,
  $official : true
) {
  @if $webkit  and $experimental-support-for-webkit    { -webkit-#{$property} : $value; }
  @if $khtml   and $experimental-support-for-khtml     {  -khtml-#{$property} : $value; }
  @if $moz     and $experimental-support-for-mozilla   {    -moz-#{$property} : $value; }
  @if $ms      and $experimental-support-for-microsoft {     -ms-#{$property} : $value; }
  @if $o       and $experimental-support-for-opera     {      -o-#{$property} : $value; }
  @if $official                                        {         #{$property} : $value; }
}

// Same as experimental(), but for cases when the property is the same and the value is vendorized
@mixin experimental-value($property, $value,
  $moz      : $experimental-support-for-mozilla,
  $webkit   : $experimental-support-for-webkit,
  $o        : $experimental-support-for-opera,
  $ms       : $experimental-support-for-microsoft,
  $khtml    : $experimental-support-for-khtml,
  $official : true
) {
  @if $webkit  and $experimental-support-for-webkit    { #{$property} : -webkit-#{$value}; }
  @if $khtml   and $experimental-support-for-khtml     { #{$property} :  -khtml-#{$value}; }
  @if $moz     and $experimental-support-for-mozilla   { #{$property} :    -moz-#{$value}; }
  @if $ms      and $experimental-support-for-microsoft { #{$property} :     -ms-#{$value}; }
  @if $o       and $experimental-support-for-opera     { #{$property} :      -o-#{$value}; }
  @if $official                                        { #{$property} :         #{$value}; }
}

$default-border-radius: 5px !default;

// Round all corners by a specific amount, defaults to value of `$default-border-radius`.
//
// When two values are passed, the first is the horizontal radius
// and the second is the vertical radius.
//
// Note: webkit does not support shorthand syntax for several corners at once.
// So in the case where you pass several values only the first will be passed to webkit.
//
// Examples:
//
//     .simple   { @include border-radius(4px, 4px); }
//     .compound { @include border-radius(2px 5px, 3px 6px); }
//     .crazy    { @include border-radius(1px 3px 5px 7px, 2px 4px 6px 8px)}
//
// Which generates:
//
//    .simple {
//      -webkit-border-radius: 4px 4px;
//      -moz-border-radius: 4px / 4px;
//      -khtml-border-radius: 4px / 4px;
//      border-radius: 4px / 4px; }
//    
//    .compound {
//      -webkit-border-radius: 2px 3px;
//      -moz-border-radius: 2px 5px / 3px 6px;
//      -khtml-border-radius: 2px 5px / 3px 6px;
//      border-radius: 2px 5px / 3px 6px; }
//    
//    .crazy {
//      -webkit-border-radius: 1px 2px;
//      -moz-border-radius: 1px 3px 5px 7px / 2px 4px 6px 8px;
//      -khtml-border-radius: 1px 3px 5px 7px / 2px 4px 6px 8px;
//      border-radius: 1px 3px 5px 7px / 2px 4px 6px 8px; }

@mixin border-radius($radius: $default-border-radius, $vertical-radius: false) {

  @if $vertical-radius {
    // Webkit doesn't understand the official shorthand syntax for specifying
    // a vertical radius unless so in case there's several we only take the first.
    @include experimental(border-radius, first-value-of($radius) first-value-of($vertical-radius),
      not(-moz),
      -webkit,
      not(-o),
      not(-ms),
      not(-khtml),
      not(official)
    );
    @include experimental("border-radius", $radius unquote("/") $vertical-radius,
      -moz,
      not(-webkit),
      not(-o),
      not(-ms),
      -khtml,
      official
    );
  }
  @else {
    @include experimental(border-radius, $radius);
  }
}

// Round radius at position by amount.
//
// * legal values for `$vert`: `top`, `bottom`
// * legal values for `$horz`: `left`, `right`

@mixin border-corner-radius($vert, $horz, $radius: $default-border-radius) {
  // Support for mozilla's syntax for specifying a corner
  @include experimental("border-radius-#{$vert}#{$horz}", $radius,
    -moz,
    not(-webkit),
    not(-o),
    not(-ms),
    not(-khtml),
    not(official)
  );
  @include experimental("border-#{$vert}-#{$horz}-radius", $radius,
    not(-moz),
    -webkit,
    not(-o),
    not(-ms),
    -khtml,
    official
  );
  
}

// Round top-left corner only

@mixin border-top-left-radius($radius: $default-border-radius) {
  @include border-corner-radius(top, left, $radius); }

// Round top-right corner only

@mixin border-top-right-radius($radius: $default-border-radius) {
  @include border-corner-radius(top, right, $radius); }

// Round bottom-left corner only

@mixin border-bottom-left-radius($radius: $default-border-radius) {
  @include border-corner-radius(bottom, left, $radius); }

// Round bottom-right corner only

@mixin border-bottom-right-radius($radius: $default-border-radius) {
  @include border-corner-radius(bottom, right, $radius); }

// Round both top corners by amount
@mixin border-top-radius($radius: $default-border-radius) {
  @include border-top-left-radius($radius);
  @include border-top-right-radius($radius); }

// Round both right corners by amount
@mixin border-right-radius($radius: $default-border-radius) {
  @include border-top-right-radius($radius);
  @include border-bottom-right-radius($radius); }

// Round both bottom corners by amount
@mixin border-bottom-radius($radius: $default-border-radius) {
  @include border-bottom-left-radius($radius);
  @include border-bottom-right-radius($radius); }

// Round both left corners by amount
@mixin border-left-radius($radius: $default-border-radius) {
  @include border-top-left-radius($radius);
  @include border-bottom-left-radius($radius); }

// Usually compass hacks apply to both ie6 & 7 -- set this to false to disable support for both.
$legacy-support-for-ie: true !default;

// Setting this to false will result in smaller output, but no support for ie6 hacks
$legacy-support-for-ie6: $legacy-support-for-ie !default;

// Setting this to false will result in smaller output, but no support for ie7 hacks
$legacy-support-for-ie7: $legacy-support-for-ie !default;

// Setting this to false will result in smaller output, but no support for legacy ie8 hacks
$legacy-support-for-ie8: $legacy-support-for-ie !default;

// @private
// The user can simply set $legacy-support-for-ie and 6, 7, and 8 will be set accordingly,
// But in case the user set each of those explicitly, we need to sync the value of
// this combined variable.
$legacy-support-for-ie: $legacy-support-for-ie6 or $legacy-support-for-ie7 or $legacy-support-for-ie8;

// Whether to output legacy support for mozilla.
// Usually this means hacks to support Firefox 3.6 or earlier.
$legacy-support-for-mozilla: true;

// Support for mozilla in experimental css3 properties (-moz).
$experimental-support-for-mozilla      : true !default;
// Support for webkit in experimental css3 properties (-webkit).
$experimental-support-for-webkit       : true !default;
// Support for webkit's original (non-standard) gradient syntax.
$support-for-original-webkit-gradients : true !default;
// Support for opera in experimental css3 properties (-o).
$experimental-support-for-opera        : true !default;
// Support for microsoft in experimental css3 properties (-ms).
$experimental-support-for-microsoft    : true !default;
// Support for khtml in experimental css3 properties (-khtml).
$experimental-support-for-khtml        : false !default;
// Support for svg in experimental css3 properties.
// Setting this to true might add significant size to your
// generated stylesheets.
$experimental-support-for-svg          : false !default;
// Support for CSS PIE in experimental css3 properties (-pie).
$experimental-support-for-pie          : false !default;

// This mixin provides basic support for CSS3 properties and
// their corresponding experimental CSS2 properties when
// the implementations are identical except for the property
// prefix.
@mixin experimental($property, $value,
  $moz      : $experimental-support-for-mozilla,
  $webkit   : $experimental-support-for-webkit,
  $o        : $experimental-support-for-opera,
  $ms       : $experimental-support-for-microsoft,
  $khtml    : $experimental-support-for-khtml,
  $official : true
) {
  @if $webkit  and $experimental-support-for-webkit    { -webkit-#{$property} : $value; }
  @if $khtml   and $experimental-support-for-khtml     {  -khtml-#{$property} : $value; }
  @if $moz     and $experimental-support-for-mozilla   {    -moz-#{$property} : $value; }
  @if $ms      and $experimental-support-for-microsoft {     -ms-#{$property} : $value; }
  @if $o       and $experimental-support-for-opera     {      -o-#{$property} : $value; }
  @if $official                                        {         #{$property} : $value; }
}

// Same as experimental(), but for cases when the property is the same and the value is vendorized
@mixin experimental-value($property, $value,
  $moz      : $experimental-support-for-mozilla,
  $webkit   : $experimental-support-for-webkit,
  $o        : $experimental-support-for-opera,
  $ms       : $experimental-support-for-microsoft,
  $khtml    : $experimental-support-for-khtml,
  $official : true
) {
  @if $webkit  and $experimental-support-for-webkit    { #{$property} : -webkit-#{$value}; }
  @if $khtml   and $experimental-support-for-khtml     { #{$property} :  -khtml-#{$value}; }
  @if $moz     and $experimental-support-for-mozilla   { #{$property} :    -moz-#{$value}; }
  @if $ms      and $experimental-support-for-microsoft { #{$property} :     -ms-#{$value}; }
  @if $o       and $experimental-support-for-opera     { #{$property} :      -o-#{$value}; }
  @if $official                                        { #{$property} :         #{$value}; }
}

// Set `$inline-block-alignment` to `none` or `false` to disable the output
// of a vertical-align property in the inline-block mixin.
// Or set it to a legal value for `vertical-align` to change the default.
$inline-block-alignment: middle !default;

// Provides a cross-browser method to implement `display: inline-block;`
@mixin inline-block($alignment: $inline-block-alignment) {
  @if $legacy-support-for-mozilla {
    display: -moz-inline-stack;
  }
  display: inline-block;
  @if $alignment and $alignment != none {
    vertical-align: $alignment;
  }
  @if $legacy-support-for-ie {
    *vertical-align: auto;
    zoom: 1;
    *display: inline;
  }
}

// Usually compass hacks apply to both ie6 & 7 -- set this to false to disable support for both.
$legacy-support-for-ie: true !default;

// Setting this to false will result in smaller output, but no support for ie6 hacks
$legacy-support-for-ie6: $legacy-support-for-ie !default;

// Setting this to false will result in smaller output, but no support for ie7 hacks
$legacy-support-for-ie7: $legacy-support-for-ie !default;

// Setting this to false will result in smaller output, but no support for legacy ie8 hacks
$legacy-support-for-ie8: $legacy-support-for-ie !default;

// @private
// The user can simply set $legacy-support-for-ie and 6, 7, and 8 will be set accordingly,
// But in case the user set each of those explicitly, we need to sync the value of
// this combined variable.
$legacy-support-for-ie: $legacy-support-for-ie6 or $legacy-support-for-ie7 or $legacy-support-for-ie8;

// Whether to output legacy support for mozilla.
// Usually this means hacks to support Firefox 3.6 or earlier.
$legacy-support-for-mozilla: true;

// Support for mozilla in experimental css3 properties (-moz).
$experimental-support-for-mozilla      : true !default;
// Support for webkit in experimental css3 properties (-webkit).
$experimental-support-for-webkit       : true !default;
// Support for webkit's original (non-standard) gradient syntax.
$support-for-original-webkit-gradients : true !default;
// Support for opera in experimental css3 properties (-o).
$experimental-support-for-opera        : true !default;
// Support for microsoft in experimental css3 properties (-ms).
$experimental-support-for-microsoft    : true !default;
// Support for khtml in experimental css3 properties (-khtml).
$experimental-support-for-khtml        : false !default;
// Support for svg in experimental css3 properties.
// Setting this to true might add significant size to your
// generated stylesheets.
$experimental-support-for-svg          : false !default;
// Support for CSS PIE in experimental css3 properties (-pie).
$experimental-support-for-pie          : false !default;

// This mixin provides basic support for CSS3 properties and
// their corresponding experimental CSS2 properties when
// the implementations are identical except for the property
// prefix.
@mixin experimental($property, $value,
  $moz      : $experimental-support-for-mozilla,
  $webkit   : $experimental-support-for-webkit,
  $o        : $experimental-support-for-opera,
  $ms       : $experimental-support-for-microsoft,
  $khtml    : $experimental-support-for-khtml,
  $official : true
) {
  @if $webkit  and $experimental-support-for-webkit    { -webkit-#{$property} : $value; }
  @if $khtml   and $experimental-support-for-khtml     {  -khtml-#{$property} : $value; }
  @if $moz     and $experimental-support-for-mozilla   {    -moz-#{$property} : $value; }
  @if $ms      and $experimental-support-for-microsoft {     -ms-#{$property} : $value; }
  @if $o       and $experimental-support-for-opera     {      -o-#{$property} : $value; }
  @if $official                                        {         #{$property} : $value; }
}

// Same as experimental(), but for cases when the property is the same and the value is vendorized
@mixin experimental-value($property, $value,
  $moz      : $experimental-support-for-mozilla,
  $webkit   : $experimental-support-for-webkit,
  $o        : $experimental-support-for-opera,
  $ms       : $experimental-support-for-microsoft,
  $khtml    : $experimental-support-for-khtml,
  $official : true
) {
  @if $webkit  and $experimental-support-for-webkit    { #{$property} : -webkit-#{$value}; }
  @if $khtml   and $experimental-support-for-khtml     { #{$property} :  -khtml-#{$value}; }
  @if $moz     and $experimental-support-for-mozilla   { #{$property} :    -moz-#{$value}; }
  @if $ms      and $experimental-support-for-microsoft { #{$property} :     -ms-#{$value}; }
  @if $o       and $experimental-support-for-opera     { #{$property} :      -o-#{$value}; }
  @if $official                                        { #{$property} :         #{$value}; }
}

// Provides cross-browser CSS opacity. Takes a number between 0 and 1 as the argument, e.g. 0.5 for 50% opacity.
//
//     @param $opacity
//         A number between 0 and 1, where 0 is transparent and 1 is opaque.

@mixin opacity($opacity) {
  @if $legacy-support-for-ie6 or $legacy-support-for-ie7 or $legacy-support-for-ie8 {
    filter: unquote("progid:DXImageTransform.Microsoft.Alpha(Opacity=#{round($opacity * 100)})");
  }
  opacity: $opacity;
}

// Make an element completely transparent.
@mixin transparent { @include opacity(0); }

// Make an element completely opaque.
@mixin opaque { @include opacity(1); }

// @doc off
// These defaults make the arguments optional for this mixin
// If you like, set different defaults before importing.
// @doc on

// Usually compass hacks apply to both ie6 & 7 -- set this to false to disable support for both.
$legacy-support-for-ie: true !default;

// Setting this to false will result in smaller output, but no support for ie6 hacks
$legacy-support-for-ie6: $legacy-support-for-ie !default;

// Setting this to false will result in smaller output, but no support for ie7 hacks
$legacy-support-for-ie7: $legacy-support-for-ie !default;

// Setting this to false will result in smaller output, but no support for legacy ie8 hacks
$legacy-support-for-ie8: $legacy-support-for-ie !default;

// @private
// The user can simply set $legacy-support-for-ie and 6, 7, and 8 will be set accordingly,
// But in case the user set each of those explicitly, we need to sync the value of
// this combined variable.
$legacy-support-for-ie: $legacy-support-for-ie6 or $legacy-support-for-ie7 or $legacy-support-for-ie8;

// Whether to output legacy support for mozilla.
// Usually this means hacks to support Firefox 3.6 or earlier.
$legacy-support-for-mozilla: true;

// Support for mozilla in experimental css3 properties (-moz).
$experimental-support-for-mozilla      : true !default;
// Support for webkit in experimental css3 properties (-webkit).
$experimental-support-for-webkit       : true !default;
// Support for webkit's original (non-standard) gradient syntax.
$support-for-original-webkit-gradients : true !default;
// Support for opera in experimental css3 properties (-o).
$experimental-support-for-opera        : true !default;
// Support for microsoft in experimental css3 properties (-ms).
$experimental-support-for-microsoft    : true !default;
// Support for khtml in experimental css3 properties (-khtml).
$experimental-support-for-khtml        : false !default;
// Support for svg in experimental css3 properties.
// Setting this to true might add significant size to your
// generated stylesheets.
$experimental-support-for-svg          : false !default;
// Support for CSS PIE in experimental css3 properties (-pie).
$experimental-support-for-pie          : false !default;

// This mixin provides basic support for CSS3 properties and
// their corresponding experimental CSS2 properties when
// the implementations are identical except for the property
// prefix.
@mixin experimental($property, $value,
  $moz      : $experimental-support-for-mozilla,
  $webkit   : $experimental-support-for-webkit,
  $o        : $experimental-support-for-opera,
  $ms       : $experimental-support-for-microsoft,
  $khtml    : $experimental-support-for-khtml,
  $official : true
) {
  @if $webkit  and $experimental-support-for-webkit    { -webkit-#{$property} : $value; }
  @if $khtml   and $experimental-support-for-khtml     {  -khtml-#{$property} : $value; }
  @if $moz     and $experimental-support-for-mozilla   {    -moz-#{$property} : $value; }
  @if $ms      and $experimental-support-for-microsoft {     -ms-#{$property} : $value; }
  @if $o       and $experimental-support-for-opera     {      -o-#{$property} : $value; }
  @if $official                                        {         #{$property} : $value; }
}

// Same as experimental(), but for cases when the property is the same and the value is vendorized
@mixin experimental-value($property, $value,
  $moz      : $experimental-support-for-mozilla,
  $webkit   : $experimental-support-for-webkit,
  $o        : $experimental-support-for-opera,
  $ms       : $experimental-support-for-microsoft,
  $khtml    : $experimental-support-for-khtml,
  $official : true
) {
  @if $webkit  and $experimental-support-for-webkit    { #{$property} : -webkit-#{$value}; }
  @if $khtml   and $experimental-support-for-khtml     { #{$property} :  -khtml-#{$value}; }
  @if $moz     and $experimental-support-for-mozilla   { #{$property} :    -moz-#{$value}; }
  @if $ms      and $experimental-support-for-microsoft { #{$property} :     -ms-#{$value}; }
  @if $o       and $experimental-support-for-opera     { #{$property} :      -o-#{$value}; }
  @if $official                                        { #{$property} :         #{$value}; }
}

// The default color for box shadows
$default-box-shadow-color: #333333 !default;

// The default horizontal offset. Positive is to the right.
$default-box-shadow-h-offset: 0px !default;

// The default vertical offset. Positive is down.
$default-box-shadow-v-offset: 0px !default;

// The default blur length.
$default-box-shadow-blur: 5px !default;

// The default spread length.
$default-box-shadow-spread : false !default;

// The default shadow inset: inset or false (for standard shadow).
$default-box-shadow-inset : false !default;

// Provides cross-browser for Webkit, Gecko, and CSS3 box shadows when one or more box
// shadows are needed.
// Each shadow argument should adhere to the standard css3 syntax for the
// box-shadow property.
@mixin box-shadow(
  $shadow-1 : default,
  $shadow-2 : false,
  $shadow-3 : false,
  $shadow-4 : false,
  $shadow-5 : false,
  $shadow-6 : false,
  $shadow-7 : false,
  $shadow-8 : false,
  $shadow-9 : false,
  $shadow-10: false
) {
  @if $shadow-1 == default {
    $shadow-1 : -compass-space-list(compact(if($default-box-shadow-inset, inset, false), $default-box-shadow-h-offset, $default-box-shadow-v-offset, $default-box-shadow-blur, $default-box-shadow-spread, $default-box-shadow-color));
  }
  $shadow : compact($shadow-1, $shadow-2, $shadow-3, $shadow-4, $shadow-5, $shadow-6, $shadow-7, $shadow-8, $shadow-9, $shadow-10);
  @include experimental(box-shadow, $shadow,
    -moz, -webkit, not(-o), not(-ms), not(-khtml), official
  );
}

// Provides a single cross-browser CSS box shadow for Webkit, Gecko, and CSS3.
// Includes default arguments for horizontal offset, vertical offset, blur length, spread length, color and inset.
@mixin single-box-shadow(
  $hoff   : $default-box-shadow-h-offset,
  $voff   : $default-box-shadow-v-offset,
  $blur   : $default-box-shadow-blur,
  $spread : $default-box-shadow-spread,
  $color  : $default-box-shadow-color,
  $inset  : $default-box-shadow-inset
) {
  @if not ($inset == true or $inset == false or $inset == inset) {
    @warn "$inset expected to be true or the inset keyword. Got #{$inset} instead. Using: inset";
  }

  @if $color == none {
    @include box-shadow(none);
  } @else {
    $full   : $hoff $voff;
    @if $blur   { $full: $full $blur;   }
    @if $spread { $full: $full $spread; }
    @if $color  { $full: $full $color;  }
    @if $inset  { $full: inset $full;   }
    @include box-shadow($full);
  }
}

// Usually compass hacks apply to both ie6 & 7 -- set this to false to disable support for both.
$legacy-support-for-ie: true !default;

// Setting this to false will result in smaller output, but no support for ie6 hacks
$legacy-support-for-ie6: $legacy-support-for-ie !default;

// Setting this to false will result in smaller output, but no support for ie7 hacks
$legacy-support-for-ie7: $legacy-support-for-ie !default;

// Setting this to false will result in smaller output, but no support for legacy ie8 hacks
$legacy-support-for-ie8: $legacy-support-for-ie !default;

// @private
// The user can simply set $legacy-support-for-ie and 6, 7, and 8 will be set accordingly,
// But in case the user set each of those explicitly, we need to sync the value of
// this combined variable.
$legacy-support-for-ie: $legacy-support-for-ie6 or $legacy-support-for-ie7 or $legacy-support-for-ie8;

// Whether to output legacy support for mozilla.
// Usually this means hacks to support Firefox 3.6 or earlier.
$legacy-support-for-mozilla: true;

// Support for mozilla in experimental css3 properties (-moz).
$experimental-support-for-mozilla      : true !default;
// Support for webkit in experimental css3 properties (-webkit).
$experimental-support-for-webkit       : true !default;
// Support for webkit's original (non-standard) gradient syntax.
$support-for-original-webkit-gradients : true !default;
// Support for opera in experimental css3 properties (-o).
$experimental-support-for-opera        : true !default;
// Support for microsoft in experimental css3 properties (-ms).
$experimental-support-for-microsoft    : true !default;
// Support for khtml in experimental css3 properties (-khtml).
$experimental-support-for-khtml        : false !default;
// Support for svg in experimental css3 properties.
// Setting this to true might add significant size to your
// generated stylesheets.
$experimental-support-for-svg          : false !default;
// Support for CSS PIE in experimental css3 properties (-pie).
$experimental-support-for-pie          : false !default;

// This mixin provides basic support for CSS3 properties and
// their corresponding experimental CSS2 properties when
// the implementations are identical except for the property
// prefix.
@mixin experimental($property, $value,
  $moz      : $experimental-support-for-mozilla,
  $webkit   : $experimental-support-for-webkit,
  $o        : $experimental-support-for-opera,
  $ms       : $experimental-support-for-microsoft,
  $khtml    : $experimental-support-for-khtml,
  $official : true
) {
  @if $webkit  and $experimental-support-for-webkit    { -webkit-#{$property} : $value; }
  @if $khtml   and $experimental-support-for-khtml     {  -khtml-#{$property} : $value; }
  @if $moz     and $experimental-support-for-mozilla   {    -moz-#{$property} : $value; }
  @if $ms      and $experimental-support-for-microsoft {     -ms-#{$property} : $value; }
  @if $o       and $experimental-support-for-opera     {      -o-#{$property} : $value; }
  @if $official                                        {         #{$property} : $value; }
}

// Same as experimental(), but for cases when the property is the same and the value is vendorized
@mixin experimental-value($property, $value,
  $moz      : $experimental-support-for-mozilla,
  $webkit   : $experimental-support-for-webkit,
  $o        : $experimental-support-for-opera,
  $ms       : $experimental-support-for-microsoft,
  $khtml    : $experimental-support-for-khtml,
  $official : true
) {
  @if $webkit  and $experimental-support-for-webkit    { #{$property} : -webkit-#{$value}; }
  @if $khtml   and $experimental-support-for-khtml     { #{$property} :  -khtml-#{$value}; }
  @if $moz     and $experimental-support-for-mozilla   { #{$property} :    -moz-#{$value}; }
  @if $ms      and $experimental-support-for-microsoft { #{$property} :     -ms-#{$value}; }
  @if $o       and $experimental-support-for-opera     { #{$property} :      -o-#{$value}; }
  @if $official                                        { #{$property} :         #{$value}; }
}

// These defaults make the arguments optional for this mixin
// If you like, set different defaults in your project

$default-text-shadow-color:    #aaa !default;
$default-text-shadow-h-offset: 0px  !default;
$default-text-shadow-v-offset: 0px  !default;
$default-text-shadow-blur:     1px  !default;
$default-text-shadow-spread:   false  !default;

// Provides cross-browser text shadows when one or more shadows are needed.
// Each shadow argument should adhere to the standard css3 syntax for the
// text-shadow property.
//
// Note: if any shadow has a spread parameter, this will cause the mixin
// to emit the shadow declaration twice, first without the spread,
// then with the spread included. This allows you to progressively
// enhance the browsers that do support the spread parameter.
@mixin text-shadow(
  $shadow-1 : default,
  $shadow-2 : false,
  $shadow-3 : false,
  $shadow-4 : false,
  $shadow-5 : false,
  $shadow-6 : false,
  $shadow-7 : false,
  $shadow-8 : false,
  $shadow-9 : false,
  $shadow-10: false
) {
  @if $shadow-1 == default {
    $shadow-1: compact($default-text-shadow-h-offset $default-text-shadow-v-offset $default-text-shadow-blur $default-text-shadow-spread $default-text-shadow-color);
  }
  $shadows-without-spread: join((),(),comma);
  $shadows: join((),(),comma);
  $has-spread: false;
  @each $shadow in compact($shadow-1, $shadow-2, $shadow-3, $shadow-4, $shadow-5,
                           $shadow-6, $shadow-7, $shadow-8, $shadow-9, $shadow-10) {
    @if length($shadow) > 4 {
      $has-spread: true;
      $shadows-without-spread: append($shadows-without-spread, nth($shadow,1) nth($shadow,2) nth($shadow,3) nth($shadow,5));
      $shadows: append($shadows, $shadow);
    } else {
      $shadows-without-spread: append($shadows-without-spread, $shadow);
      $shadows: append($shadows, $shadow);
    }
  }
  @if $has-spread {
    text-shadow: $shadows-without-spread;
  }
  text-shadow: $shadows;
}

// Provides a single cross-browser CSS text shadow.
//
// Provides sensible defaults for the color, horizontal offset, vertical offset, blur, and spread
// according to the configuration defaults above.
@mixin single-text-shadow(
  $hoff: false,
  $voff: false,
  $blur: false,
  $spread: false,
  $color: false
) {
  // A lot of people think the color comes first. It doesn't.
  @if type-of($hoff) == color {
    $temp-color: $hoff;
    $hoff: $voff;
    $voff: $blur;
    $blur: $spread;
    $spread: $color;
    $color: $temp-color;
  }
  // Can't rely on default assignment with multiple supported argument orders.
  $hoff:   if($hoff,   $hoff,   $default-text-shadow-h-offset);
  $voff:   if($voff,   $voff,   $default-text-shadow-v-offset);
  $blur:   if($blur,   $blur,   $default-text-shadow-blur    );
  $spread: if($spread, $spread, $default-text-shadow-spread  );
  $color:  if($color,  $color,  $default-text-shadow-color   );
  // We don't need experimental support for this property.
  @if $color == none or $hoff == none {
    @include text-shadow(none);
  } @else {
    @include text-shadow(compact($hoff $voff $blur $spread $color));
  }
}

// Usually compass hacks apply to both ie6 & 7 -- set this to false to disable support for both.
$legacy-support-for-ie: true !default;

// Setting this to false will result in smaller output, but no support for ie6 hacks
$legacy-support-for-ie6: $legacy-support-for-ie !default;

// Setting this to false will result in smaller output, but no support for ie7 hacks
$legacy-support-for-ie7: $legacy-support-for-ie !default;

// Setting this to false will result in smaller output, but no support for legacy ie8 hacks
$legacy-support-for-ie8: $legacy-support-for-ie !default;

// @private
// The user can simply set $legacy-support-for-ie and 6, 7, and 8 will be set accordingly,
// But in case the user set each of those explicitly, we need to sync the value of
// this combined variable.
$legacy-support-for-ie: $legacy-support-for-ie6 or $legacy-support-for-ie7 or $legacy-support-for-ie8;

// Whether to output legacy support for mozilla.
// Usually this means hacks to support Firefox 3.6 or earlier.
$legacy-support-for-mozilla: true;

// Support for mozilla in experimental css3 properties (-moz).
$experimental-support-for-mozilla      : true !default;
// Support for webkit in experimental css3 properties (-webkit).
$experimental-support-for-webkit       : true !default;
// Support for webkit's original (non-standard) gradient syntax.
$support-for-original-webkit-gradients : true !default;
// Support for opera in experimental css3 properties (-o).
$experimental-support-for-opera        : true !default;
// Support for microsoft in experimental css3 properties (-ms).
$experimental-support-for-microsoft    : true !default;
// Support for khtml in experimental css3 properties (-khtml).
$experimental-support-for-khtml        : false !default;
// Support for svg in experimental css3 properties.
// Setting this to true might add significant size to your
// generated stylesheets.
$experimental-support-for-svg          : false !default;
// Support for CSS PIE in experimental css3 properties (-pie).
$experimental-support-for-pie          : false !default;

// This mixin provides basic support for CSS3 properties and
// their corresponding experimental CSS2 properties when
// the implementations are identical except for the property
// prefix.
@mixin experimental($property, $value,
  $moz      : $experimental-support-for-mozilla,
  $webkit   : $experimental-support-for-webkit,
  $o        : $experimental-support-for-opera,
  $ms       : $experimental-support-for-microsoft,
  $khtml    : $experimental-support-for-khtml,
  $official : true
) {
  @if $webkit  and $experimental-support-for-webkit    { -webkit-#{$property} : $value; }
  @if $khtml   and $experimental-support-for-khtml     {  -khtml-#{$property} : $value; }
  @if $moz     and $experimental-support-for-mozilla   {    -moz-#{$property} : $value; }
  @if $ms      and $experimental-support-for-microsoft {     -ms-#{$property} : $value; }
  @if $o       and $experimental-support-for-opera     {      -o-#{$property} : $value; }
  @if $official                                        {         #{$property} : $value; }
}

// Same as experimental(), but for cases when the property is the same and the value is vendorized
@mixin experimental-value($property, $value,
  $moz      : $experimental-support-for-mozilla,
  $webkit   : $experimental-support-for-webkit,
  $o        : $experimental-support-for-opera,
  $ms       : $experimental-support-for-microsoft,
  $khtml    : $experimental-support-for-khtml,
  $official : true
) {
  @if $webkit  and $experimental-support-for-webkit    { #{$property} : -webkit-#{$value}; }
  @if $khtml   and $experimental-support-for-khtml     { #{$property} :  -khtml-#{$value}; }
  @if $moz     and $experimental-support-for-mozilla   { #{$property} :    -moz-#{$value}; }
  @if $ms      and $experimental-support-for-microsoft { #{$property} :     -ms-#{$value}; }
  @if $o       and $experimental-support-for-opera     { #{$property} :      -o-#{$value}; }
  @if $official                                        { #{$property} :         #{$value}; }
}

// Specify the shorthand `columns` property.
//
// Example:
//
//     @include columns(20em 2)
@mixin columns($width-and-count) {
  @include experimental(columns, $width-and-count,
    -moz, -webkit, -o, -ms, not(-khtml), official
  );
}

// Specify the number of columns
@mixin column-count($count) {
  @include experimental(column-count, $count,
    -moz, -webkit, -o, -ms, not(-khtml), official
  );
}

// Specify the gap between columns e.g. `20px`
@mixin column-gap($width) {
  @include experimental(column-gap, $width,
    -moz, -webkit, -o, -ms, not(-khtml), official
  );
}

// Specify the width of columns e.g. `100px`
@mixin column-width($width) {
  @include experimental(column-width, $width,
    -moz, -webkit, -o, -ms, not(-khtml), official
  );
}

// Specify the width of the rule between columns e.g. `1px`
@mixin column-rule-width($width) {
  @include experimental(column-rule-width, $width,
    -moz, -webkit, -o, -ms, not(-khtml), official
  );
}

// Specify the style of the rule between columns e.g. `dotted`.
// This works like border-style.
@mixin column-rule-style($style) {
  @include experimental(column-rule-style, unquote($style),
    -moz, -webkit, -o, -ms, not(-khtml), official
  );
}

// Specify the color of the rule between columns e.g. `blue`.
// This works like border-color.
@mixin column-rule-color($color) {
  @include experimental(column-rule-color, $color,
    -moz, -webkit, -o, -ms, not(-khtml), official
  );
}

// Mixin encompassing all column rule properties
// For example:
//
//     @include column-rule(1px, solid, #c00)
//
// Or the values can be space separated:
//
//     @include column-rule(1px solid #c00)
@mixin column-rule($width, $style: false, $color: false) {
  $full : -compass-space-list(compact($width, $style, $color));
  @include experimental(column-rule, $full,
    -moz, -webkit, -o, -ms, not(-khtml), official
  );
}

// Mixin for setting column-break-before
//
// * legal values are auto, always, avoid, left, right, page, column, avoid-page, avoid-column
//
//  Example: 
//    h2.before {@include column-break-before(always);}
//
//  Which generates: 
//
//  h2.before {    
//    -webkit-column-break-before: always;
//    column-break-before: always;}
@mixin column-break-before($value: auto){
   @include experimental(column-break-before, $value, not(-moz), -webkit, not(-o), not(-ms), not(-khtml), official );
}

// Mixin for setting column-break-after
//
// * legal values are auto, always, avoid, left, right, page, column, avoid-page, avoid-column
//
//  Example: 
//    h2.after {@include column-break-after(always); }
//
//  Which generates: 
//
//  h2.after {
//    -webkit-column-break-after: always;
//    column-break-after: always; }
@mixin column-break-after($value: auto){
   @include experimental(column-break-after, $value, not(-moz), -webkit, not(-o), not(-ms), not(-khtml), official );
}

// Mixin for setting column-break-inside
//
// * legal values are auto, avoid, avoid-page, avoid-column
//
//  Example: 
//    h2.inside {@include column-break-inside();}
//  Which generates: 
//  
//  h2.inside {
//    -webkit-column-break-inside: auto;
//    column-break-inside: auto;}
@mixin column-break-inside($value: auto){
   @include experimental(column-break-inside, $value, not(-moz), -webkit, not(-o), not(-ms), not(-khtml), official );
}

// All-purpose mixin for setting column breaks.
//
// * legal values for $type : before, after, inside 
// * legal values for '$value' are dependent on $type
//    * when $type = before, legal values are auto, always, avoid, left, right, page, column, avoid-page, avoid-column
//    * when $type = after, legal values are auto, always, avoid, left, right, page, column, avoid-page, avoid-column
//    * when $type = inside, legal values are auto, avoid, avoid-page, avoid-column
//  
//  Examples: 
//    h2.before {@include column-break(before, always);}
//    h2.after {@include column-break(after, always); }
//    h2.inside {@include column-break(inside); }
//
//  Which generates: 
//  h2.before {    
//    -webkit-column-break-before: always;
//    column-break-before: always;}
//  
//  h2.after {
//    -webkit-column-break-after: always;
//    column-break-after: always; }
//
//  h2.inside {
//    -webkit-column-break-inside: auto;
//    column-break-inside: auto;}
 
@mixin column-break($type: before, $value: auto){
   @include experimental("column-break-#{$type}", $value, not(-moz), -webkit, not(-o), not(-ms), not(-khtml), official );
}
// Usually compass hacks apply to both ie6 & 7 -- set this to false to disable support for both.
$legacy-support-for-ie: true !default;

// Setting this to false will result in smaller output, but no support for ie6 hacks
$legacy-support-for-ie6: $legacy-support-for-ie !default;

// Setting this to false will result in smaller output, but no support for ie7 hacks
$legacy-support-for-ie7: $legacy-support-for-ie !default;

// Setting this to false will result in smaller output, but no support for legacy ie8 hacks
$legacy-support-for-ie8: $legacy-support-for-ie !default;

// @private
// The user can simply set $legacy-support-for-ie and 6, 7, and 8 will be set accordingly,
// But in case the user set each of those explicitly, we need to sync the value of
// this combined variable.
$legacy-support-for-ie: $legacy-support-for-ie6 or $legacy-support-for-ie7 or $legacy-support-for-ie8;

// Whether to output legacy support for mozilla.
// Usually this means hacks to support Firefox 3.6 or earlier.
$legacy-support-for-mozilla: true;

// Support for mozilla in experimental css3 properties (-moz).
$experimental-support-for-mozilla      : true !default;
// Support for webkit in experimental css3 properties (-webkit).
$experimental-support-for-webkit       : true !default;
// Support for webkit's original (non-standard) gradient syntax.
$support-for-original-webkit-gradients : true !default;
// Support for opera in experimental css3 properties (-o).
$experimental-support-for-opera        : true !default;
// Support for microsoft in experimental css3 properties (-ms).
$experimental-support-for-microsoft    : true !default;
// Support for khtml in experimental css3 properties (-khtml).
$experimental-support-for-khtml        : false !default;
// Support for svg in experimental css3 properties.
// Setting this to true might add significant size to your
// generated stylesheets.
$experimental-support-for-svg          : false !default;
// Support for CSS PIE in experimental css3 properties (-pie).
$experimental-support-for-pie          : false !default;

// This mixin provides basic support for CSS3 properties and
// their corresponding experimental CSS2 properties when
// the implementations are identical except for the property
// prefix.
@mixin experimental($property, $value,
  $moz      : $experimental-support-for-mozilla,
  $webkit   : $experimental-support-for-webkit,
  $o        : $experimental-support-for-opera,
  $ms       : $experimental-support-for-microsoft,
  $khtml    : $experimental-support-for-khtml,
  $official : true
) {
  @if $webkit  and $experimental-support-for-webkit    { -webkit-#{$property} : $value; }
  @if $khtml   and $experimental-support-for-khtml     {  -khtml-#{$property} : $value; }
  @if $moz     and $experimental-support-for-mozilla   {    -moz-#{$property} : $value; }
  @if $ms      and $experimental-support-for-microsoft {     -ms-#{$property} : $value; }
  @if $o       and $experimental-support-for-opera     {      -o-#{$property} : $value; }
  @if $official                                        {         #{$property} : $value; }
}

// Same as experimental(), but for cases when the property is the same and the value is vendorized
@mixin experimental-value($property, $value,
  $moz      : $experimental-support-for-mozilla,
  $webkit   : $experimental-support-for-webkit,
  $o        : $experimental-support-for-opera,
  $ms       : $experimental-support-for-microsoft,
  $khtml    : $experimental-support-for-khtml,
  $official : true
) {
  @if $webkit  and $experimental-support-for-webkit    { #{$property} : -webkit-#{$value}; }
  @if $khtml   and $experimental-support-for-khtml     { #{$property} :  -khtml-#{$value}; }
  @if $moz     and $experimental-support-for-mozilla   { #{$property} :    -moz-#{$value}; }
  @if $ms      and $experimental-support-for-microsoft { #{$property} :     -ms-#{$value}; }
  @if $o       and $experimental-support-for-opera     { #{$property} :      -o-#{$value}; }
  @if $official                                        { #{$property} :         #{$value}; }
}

// Change the box model for Mozilla, Webkit, IE8 and the future
//
// @param $bs
//   [ content-box | border-box ]

@mixin box-sizing($bs) {
  $bs: unquote($bs);
  @include experimental(box-sizing, $bs,
    -moz, -webkit, not(-o), not(-ms), not(-khtml), official
  );
}

// Usually compass hacks apply to both ie6 & 7 -- set this to false to disable support for both.
$legacy-support-for-ie: true !default;

// Setting this to false will result in smaller output, but no support for ie6 hacks
$legacy-support-for-ie6: $legacy-support-for-ie !default;

// Setting this to false will result in smaller output, but no support for ie7 hacks
$legacy-support-for-ie7: $legacy-support-for-ie !default;

// Setting this to false will result in smaller output, but no support for legacy ie8 hacks
$legacy-support-for-ie8: $legacy-support-for-ie !default;

// @private
// The user can simply set $legacy-support-for-ie and 6, 7, and 8 will be set accordingly,
// But in case the user set each of those explicitly, we need to sync the value of
// this combined variable.
$legacy-support-for-ie: $legacy-support-for-ie6 or $legacy-support-for-ie7 or $legacy-support-for-ie8;

// Whether to output legacy support for mozilla.
// Usually this means hacks to support Firefox 3.6 or earlier.
$legacy-support-for-mozilla: true;

// Support for mozilla in experimental css3 properties (-moz).
$experimental-support-for-mozilla      : true !default;
// Support for webkit in experimental css3 properties (-webkit).
$experimental-support-for-webkit       : true !default;
// Support for webkit's original (non-standard) gradient syntax.
$support-for-original-webkit-gradients : true !default;
// Support for opera in experimental css3 properties (-o).
$experimental-support-for-opera        : true !default;
// Support for microsoft in experimental css3 properties (-ms).
$experimental-support-for-microsoft    : true !default;
// Support for khtml in experimental css3 properties (-khtml).
$experimental-support-for-khtml        : false !default;
// Support for svg in experimental css3 properties.
// Setting this to true might add significant size to your
// generated stylesheets.
$experimental-support-for-svg          : false !default;
// Support for CSS PIE in experimental css3 properties (-pie).
$experimental-support-for-pie          : false !default;

// This mixin provides basic support for CSS3 properties and
// their corresponding experimental CSS2 properties when
// the implementations are identical except for the property
// prefix.
@mixin experimental($property, $value,
  $moz      : $experimental-support-for-mozilla,
  $webkit   : $experimental-support-for-webkit,
  $o        : $experimental-support-for-opera,
  $ms       : $experimental-support-for-microsoft,
  $khtml    : $experimental-support-for-khtml,
  $official : true
) {
  @if $webkit  and $experimental-support-for-webkit    { -webkit-#{$property} : $value; }
  @if $khtml   and $experimental-support-for-khtml     {  -khtml-#{$property} : $value; }
  @if $moz     and $experimental-support-for-mozilla   {    -moz-#{$property} : $value; }
  @if $ms      and $experimental-support-for-microsoft {     -ms-#{$property} : $value; }
  @if $o       and $experimental-support-for-opera     {      -o-#{$property} : $value; }
  @if $official                                        {         #{$property} : $value; }
}

// Same as experimental(), but for cases when the property is the same and the value is vendorized
@mixin experimental-value($property, $value,
  $moz      : $experimental-support-for-mozilla,
  $webkit   : $experimental-support-for-webkit,
  $o        : $experimental-support-for-opera,
  $ms       : $experimental-support-for-microsoft,
  $khtml    : $experimental-support-for-khtml,
  $official : true
) {
  @if $webkit  and $experimental-support-for-webkit    { #{$property} : -webkit-#{$value}; }
  @if $khtml   and $experimental-support-for-khtml     { #{$property} :  -khtml-#{$value}; }
  @if $moz     and $experimental-support-for-mozilla   { #{$property} :    -moz-#{$value}; }
  @if $ms      and $experimental-support-for-microsoft { #{$property} :     -ms-#{$value}; }
  @if $o       and $experimental-support-for-opera     { #{$property} :      -o-#{$value}; }
  @if $official                                        { #{$property} :         #{$value}; }
}

// display:box; must be used for any of the other flexbox mixins to work properly
@mixin display-box {
  @include experimental-value(display, box,
    -moz, -webkit, not(-o), -ms, not(-khtml), official
  );
}

// Default box orientation, assuming that the user wants something less block-like
$default-box-orient: horizontal !default;

// Box orientation [ horizontal | vertical | inline-axis | block-axis | inherit ]
@mixin box-orient(
  $orientation: $default-box-orient
) {
  $orientation : unquote($orientation);
  @include experimental(box-orient, $orientation,
    -moz, -webkit, not(-o), -ms, not(-khtml), official
  );
}

// Default box-align
$default-box-align: stretch !default;

// Box align [ start | end | center | baseline | stretch ]
@mixin box-align(
  $alignment: $default-box-align
) {
  $alignment : unquote($alignment);
  @include experimental(box-align, $alignment,
    -moz, -webkit, not(-o), -ms, not(-khtml), official
  );
}

// Default box flex
$default-box-flex: 0 !default;

// mixin which takes an int argument for box flex. Apply this to the children inside the box.
//
// For example: "div.display-box > div.child-box" would get the box flex mixin.
@mixin box-flex(
  $flex: $default-box-flex
) {
  @include experimental(box-flex, $flex,
    -moz, -webkit, not(-o), -ms, not(-khtml), official
  );
}

// Default flex group
$default-box-flex-group: 1 !default;

// mixin which takes an int argument for flexible grouping
@mixin box-flex-group(
  $group: $default-box-flex-group
) {
  @include experimental(box-flex-group, $group,
    -moz, -webkit, not(-o), -ms, not(-khtml), official
  );
}

// default for ordinal group
$default-box-ordinal-group: 1 !default;

// mixin which takes an int argument for ordinal grouping and rearranging the order
@mixin box-ordinal-group(
  $group: $default-ordinal-flex-group
) {
  @include experimental(box-ordinal-group, $group,
    -moz, -webkit, not(-o), -ms, not(-khtml), official
  );
}

// Box direction default value
$default-box-direction: normal !default;

// mixin for box-direction [ normal | reverse | inherit ]
@mixin box-direction(
  $direction: $default-box-direction
) {
  $direction: unquote($direction);
  @include experimental(box-direction, $direction,
    -moz, -webkit, not(-o), -ms, not(-khtml), official
  );
}

// default for box lines
$default-box-lines: single !default;

// mixin for box lines [ single | multiple ]
@mixin box-lines(
  $lines: $default-box-lines
) {
  $lines: unquote($lines);
  @include experimental(box-lines, $lines,
    -moz, -webkit, not(-o), -ms, not(-khtml), official
  );
}

// default for box pack
$default-box-pack: start !default;

// mixin for box pack [ start | end | center | justify ]
@mixin box-pack(
  $pack: $default-box-pack
) {
  $pack: unquote($pack);
  @include experimental(box-pack, $pack,
    -moz, -webkit, not(-o), -ms, not(-khtml), official
  );
}
// Usually compass hacks apply to both ie6 & 7 -- set this to false to disable support for both.
$legacy-support-for-ie: true !default;

// Setting this to false will result in smaller output, but no support for ie6 hacks
$legacy-support-for-ie6: $legacy-support-for-ie !default;

// Setting this to false will result in smaller output, but no support for ie7 hacks
$legacy-support-for-ie7: $legacy-support-for-ie !default;

// Setting this to false will result in smaller output, but no support for legacy ie8 hacks
$legacy-support-for-ie8: $legacy-support-for-ie !default;

// @private
// The user can simply set $legacy-support-for-ie and 6, 7, and 8 will be set accordingly,
// But in case the user set each of those explicitly, we need to sync the value of
// this combined variable.
$legacy-support-for-ie: $legacy-support-for-ie6 or $legacy-support-for-ie7 or $legacy-support-for-ie8;

// Whether to output legacy support for mozilla.
// Usually this means hacks to support Firefox 3.6 or earlier.
$legacy-support-for-mozilla: true;

// Support for mozilla in experimental css3 properties (-moz).
$experimental-support-for-mozilla      : true !default;
// Support for webkit in experimental css3 properties (-webkit).
$experimental-support-for-webkit       : true !default;
// Support for webkit's original (non-standard) gradient syntax.
$support-for-original-webkit-gradients : true !default;
// Support for opera in experimental css3 properties (-o).
$experimental-support-for-opera        : true !default;
// Support for microsoft in experimental css3 properties (-ms).
$experimental-support-for-microsoft    : true !default;
// Support for khtml in experimental css3 properties (-khtml).
$experimental-support-for-khtml        : false !default;
// Support for svg in experimental css3 properties.
// Setting this to true might add significant size to your
// generated stylesheets.
$experimental-support-for-svg          : false !default;
// Support for CSS PIE in experimental css3 properties (-pie).
$experimental-support-for-pie          : false !default;

// This mixin provides basic support for CSS3 properties and
// their corresponding experimental CSS2 properties when
// the implementations are identical except for the property
// prefix.
@mixin experimental($property, $value,
  $moz      : $experimental-support-for-mozilla,
  $webkit   : $experimental-support-for-webkit,
  $o        : $experimental-support-for-opera,
  $ms       : $experimental-support-for-microsoft,
  $khtml    : $experimental-support-for-khtml,
  $official : true
) {
  @if $webkit  and $experimental-support-for-webkit    { -webkit-#{$property} : $value; }
  @if $khtml   and $experimental-support-for-khtml     {  -khtml-#{$property} : $value; }
  @if $moz     and $experimental-support-for-mozilla   {    -moz-#{$property} : $value; }
  @if $ms      and $experimental-support-for-microsoft {     -ms-#{$property} : $value; }
  @if $o       and $experimental-support-for-opera     {      -o-#{$property} : $value; }
  @if $official                                        {         #{$property} : $value; }
}

// Same as experimental(), but for cases when the property is the same and the value is vendorized
@mixin experimental-value($property, $value,
  $moz      : $experimental-support-for-mozilla,
  $webkit   : $experimental-support-for-webkit,
  $o        : $experimental-support-for-opera,
  $ms       : $experimental-support-for-microsoft,
  $khtml    : $experimental-support-for-khtml,
  $official : true
) {
  @if $webkit  and $experimental-support-for-webkit    { #{$property} : -webkit-#{$value}; }
  @if $khtml   and $experimental-support-for-khtml     { #{$property} :  -khtml-#{$value}; }
  @if $moz     and $experimental-support-for-mozilla   { #{$property} :    -moz-#{$value}; }
  @if $ms      and $experimental-support-for-microsoft { #{$property} :     -ms-#{$value}; }
  @if $o       and $experimental-support-for-opera     { #{$property} :      -o-#{$value}; }
  @if $official                                        { #{$property} :         #{$value}; }
}

// Usually compass hacks apply to both ie6 & 7 -- set this to false to disable support for both.
$legacy-support-for-ie: true !default;

// Setting this to false will result in smaller output, but no support for ie6 hacks
$legacy-support-for-ie6: $legacy-support-for-ie !default;

// Setting this to false will result in smaller output, but no support for ie7 hacks
$legacy-support-for-ie7: $legacy-support-for-ie !default;

// Setting this to false will result in smaller output, but no support for legacy ie8 hacks
$legacy-support-for-ie8: $legacy-support-for-ie !default;

// @private
// The user can simply set $legacy-support-for-ie and 6, 7, and 8 will be set accordingly,
// But in case the user set each of those explicitly, we need to sync the value of
// this combined variable.
$legacy-support-for-ie: $legacy-support-for-ie6 or $legacy-support-for-ie7 or $legacy-support-for-ie8;

// Whether to output legacy support for mozilla.
// Usually this means hacks to support Firefox 3.6 or earlier.
$legacy-support-for-mozilla: true;

// Support for mozilla in experimental css3 properties (-moz).
$experimental-support-for-mozilla      : true !default;
// Support for webkit in experimental css3 properties (-webkit).
$experimental-support-for-webkit       : true !default;
// Support for webkit's original (non-standard) gradient syntax.
$support-for-original-webkit-gradients : true !default;
// Support for opera in experimental css3 properties (-o).
$experimental-support-for-opera        : true !default;
// Support for microsoft in experimental css3 properties (-ms).
$experimental-support-for-microsoft    : true !default;
// Support for khtml in experimental css3 properties (-khtml).
$experimental-support-for-khtml        : false !default;
// Support for svg in experimental css3 properties.
// Setting this to true might add significant size to your
// generated stylesheets.
$experimental-support-for-svg          : false !default;
// Support for CSS PIE in experimental css3 properties (-pie).
$experimental-support-for-pie          : false !default;

// The `zoom` approach generates less CSS but does not validate.
// Set this to `block` to use the display-property to hack the
// element to gain layout.
$default-has-layout-approach: zoom !default;

// This mixin causes an element matching the selector
// to gain the "hasLayout" property in internet explorer.
// More information on [hasLayout](http://reference.sitepoint.com/css/haslayout).
@mixin has-layout($approach: $default-has-layout-approach) {
  @if $legacy-support-for-ie {
    @if $approach == zoom {
      @include has-layout-zoom;
    } @else if $approach == block {
      @include has-layout-block;
    } @else {
      @warn "Unknown has-layout approach: #{$approach}";
      @include has-layout-zoom;
    }
  }
}

@mixin has-layout-zoom {
  @if $legacy-support-for-ie6 or $legacy-support-for-ie7 {
    *zoom: 1;
  }
}

@mixin has-layout-block {
  @if $legacy-support-for-ie {
    // This makes ie6 get layout
    display: inline-block;
    // and this puts it back to block
    & { display: block; }
  }
}

// A hack to supply IE6 (and below) with a different property value.
// [Read more](http://www.cssportal.com/css-hacks/#in_css-important).
@mixin bang-hack($property, $value, $ie6-value) {
  @if $legacy-support-for-ie6 {
    #{$property}: #{$value} !important;
    #{$property}: #{$ie6-value};
  }
}

//
// A partial implementation of the Ruby list functions from Compass:
// https://github.com/Compass/compass/blob/stable/lib/compass/sass_extensions/functions/lists.rb
//


// compact is part of libsass

@function -compass-nth($list, $place) {
  // Yep, Sass-lists are 1-indexed.
  @if $place == "first" {
    $place: 1;
  }
  @if $place == "last" {
    $place: length($list);
  }
  @return nth($list, $place);
}

// compass_list can't be implemented in sass script

@function -compass-space-list($item1, $item2:null, $item3:null, $item4:null, $item5:null, $item6:null, $item7:null, $item8:null, $item9:null) {
  $items: ();
  // Support for polymorphism.
  @if type-of($item1) == 'list' {
    // Passing a single array of properties.
    $items: $item1;
  } @else {
    $items: $item1 $item2 $item3 $item4 $item5 $item6 $item7 $item8 $item9;
  }

  $full: first-value-of($items);

  @for $i from 2 through length($items) {
    $item: nth($items, $i);
    @if $item != null {
      $full: $full $item;
    }
  }

  @return $full;
}

@function -compass-list-size($list) {
  @return length($list);
}

@function -compass-slice($list, $start, $end: false) {
  @if $end == false {
    $end: length($list);
  }
  $full: nth($list, $start);
  @for $i from $start + 1 through $end {
    $full: $full, nth($list, $i);
  }
  @return $full;
}

@function reject($list, $reject1, $reject2:null, $reject3:null, $reject4:null, $reject5:null, $reject6:null, $reject7:null, $reject8:null, $reject9:null) {
  $rejects: $reject1, $reject2, $reject3, $reject4, $reject5, $reject6, $reject7, $reject8, $reject9;

  $full: false;
  @each $item in $list {
    @if index($rejects, $item) {}
    @else {
      @if $full {
        $full: $full, $item;
      }
      @else {
        $full: $item;
      }
    }
  }
  @return $full;
}

@function first-value-of($list) {
  @return nth($list, 1);
}

@function compact($vars...) {
  $separator: list-separator($vars);
  $list: ();
  @each $var in $vars {
      @if $var {
          $list: append($list, $var, $separator);
      }
  }
  @return $list;
}

// 
// A partial implementation of the Ruby cross browser support functions from Compass:
// https://github.com/Compass/compass/blob/stable/lib/compass/sass_extensions/functions/cross_browser_support.rb
// 

@function prefixed($prefix, $property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
  $properties: $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9;
  $prefixed: false;
  @each $item in $properties {
    @if type-of($item) == 'string' {
      $prefixed: $prefixed or str-index($item, 'url') != 1 and str-index($item, 'rgb') != 1 and str-index($item, '#') != 1;
    } @elseif type-of($item) == 'color' {
    } @elseif $item != null {
      $prefixed: true;
    }
  }
  @return $prefixed;
}

@function prefix($prefix, $property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
  $properties: "";

  // Support for polymorphism.
  @if type-of($property1) == 'list' {
    // Passing a single array of properties.
    $properties: $property1;
  } @else {
    // Passing multiple properties.
    $properties: $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9;
  }

  $props: false;
  @each $item in $properties {
    @if $item == null {}
    @else {
      @if prefixed($prefix, $item) {
        $item: #{$prefix}-#{$item};
      }
      @if $props {
        $props: $props, $item;
      }
      @else {
        $props: $item;
      }
    }
  }
  @return $props;
}

@function -svg($property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
  @return prefix('-svg', $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9);
}

@function -owg($property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
  @return prefix('-owg', $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9);
}

@function -webkit($property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
  @return prefix('-webkit', $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9);
}

@function -moz($property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
  @return prefix('-moz', $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9);
}

@function -o($property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
  @return prefix('-o', $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9);
}

@function -pie($property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
  @return prefix('-pie', $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9);
}

// 
// A partial implementation of the Ruby gradient support functions from Compass:
// https://github.com/Compass/compass/blob/v0.12.2/lib/compass/sass_extensions/functions/gradient_support.rb
// 

@function color-stops($item1, $item2:null, $item3:null, $item4:null, $item5:null, $item6:null, $item7:null, $item8:null, $item9:null) {
  $items: $item2, $item3, $item4, $item5, $item6, $item7, $item8, $item9;
  $full: $item1;
  @each $item in $items {
    @if $item != null {
      $full: $full, $item;
    }    
  }
  @return $full;
}
// 
// A partial implementation of the Ruby constants functions from Compass:
// https://github.com/Compass/compass/blob/stable/lib/compass/sass_extensions/functions/constants.rb
// 

@function opposite-position($from) {
    @if ($from == top) {
        @return bottom;
    } @else if ($from == bottom) {
        @return top;
    } @else if ($from == left) {
        @return right;
    } @else if ($from == right) {
        @return left;
    } @else if ($from == center) {
        @return center;
    }
}

// 
// A partial implementation of the Ruby display functions from Compass:
// https://github.com/Compass/compass/blob/stable/core/lib/compass/core/sass_extensions/functions/display.rb
// 

@function elements-of-type($type){
    @if ($type == block){
        @return address, article, aside, blockquote, center, dir, div, dd, details, dl, dt, fieldset, figcaption, figure, form, footer, frameset, h1, h2, h3, h4, h5, h6, hr, header, hgroup, isindex, main, menu, nav, noframes, noscript, ol, p, pre, section, summary, ul;
    } @else if ($type == inline){
        @return a, abbr, acronym, audio, b, basefont, bdo, big, br, canvas, cite, code, command, datalist, dfn, em, embed, font, i, img, input, keygen, kbd, label, mark, meter, output, progress, q, rp, rt, ruby, s, samp, select, small, span, strike, strong, sub, sup, textarea, time, tt, u, var, video, wbr;
    } @else if ($type == inline-block){
        @return img;
    } @else if ($type == table){
        @return table;
    } @else if ($type == list-item){
        @return li;
    } @else if ($type == table-row-group){
        @return tbody;
    } @else if ($type == table-header-group){
        @return thead;
    } @else if ($type == table-footer-group){
        @return tfoot;
    } @else if ($type == table-row){
        @return tr;
    } @else if ($type == table-cell){
        @return th, td;
    } @else if ($type == html5-block){
        @return article, aside, details, figcaption, figure, footer, header, hgroup, main, menu, nav, section, summary;
    } @else if ($type == html5-inline){
        @return audio, canvas, command, datalist, embed, keygen, mark, meter, output, progress, rp, rt, ruby, time, video, wbr;
    } @else if ($type == html5){
        @return article, aside, audio, canvas, command, datalist, details, embed, figcaption, figure, footer, header, hgroup, keygen, main, mark, menu, meter, nav, output, progress, rp, rt, ruby, section, summary, time, video, wbr;
    } @else if ($type == text-input){
        @return input, textarea;
    }
}

// 
// A partial implementation of the Ruby colors functions from Compass:
// https://github.com/Compass/compass/blob/stable/core/lib/compass/core/sass_extensions/functions/colors.rb
//

// a genericized version of lighten/darken so that negative values can be used.
@function adjust-lightness($color, $amount) {
    @return adjust-color($color, $lightness: $amount);
}

// Scales a color's lightness by some percentage.
// If the amount is negative, the color is scaled darker, if positive, it is scaled lighter.
// This will never return a pure light or dark color unless the amount is 100%.
@function scale-lightness($color, $amount) {
    @return scale-color($color, $lightness: $amount);
}

// a genericized version of saturate/desaturate so that negative values can be used.
@function adjust-saturation($color, $amount) {
    @return adjust-color($color, $saturation: $amount);
}

// Scales a color's saturation by some percentage.
// If the amount is negative, the color is desaturated, if positive, it is saturated.
// This will never return a pure saturated or desaturated color unless the amount is 100%.
@function scale-saturation($color, $amount) {
    @return scale-color($color, $saturation: $amount);
}

@function shade($color, $percentage) {
    @return mix(#000000, $color, $percentage);
}

@function tint($color, $percentage) {
    @return mix(#ffffff, $color, $percentage);
}


// Background property support for vendor prefixing within values.
@mixin background(
  $background-1,
  $background-2: false,
  $background-3: false,
  $background-4: false,
  $background-5: false,
  $background-6: false,
  $background-7: false,
  $background-8: false,
  $background-9: false,
  $background-10: false
) {
  $backgrounds: compact($background-1, $background-2, $background-3, $background-4, $background-5,
                        $background-6, $background-7, $background-8, $background-9, $background-10);
  $mult-bgs: -compass-list-size($backgrounds) > 1;
  $add-pie-bg: prefixed(-pie,   $backgrounds) or $mult-bgs;
  @if $experimental-support-for-svg          and prefixed(-svg,    $backgrounds) {      background:    -svg($backgrounds); }
  @if $support-for-original-webkit-gradients and prefixed(-owg,    $backgrounds) {      background:    -owg($backgrounds); }
  @if $experimental-support-for-webkit       and prefixed(-webkit, $backgrounds) {      background: -webkit($backgrounds); }
  @if $experimental-support-for-mozilla      and prefixed(-moz,    $backgrounds) {      background:    -moz($backgrounds); }
  @if $experimental-support-for-opera        and prefixed(-o,      $backgrounds) {      background:      -o($backgrounds); }
  @if $experimental-support-for-pie          and $add-pie-bg                     { -pie-background:    -pie($backgrounds); }
                                                                                        background:         $backgrounds ;
}

@mixin background-with-css2-fallback(
  $background-1,
  $background-2: false,
  $background-3: false,
  $background-4: false,
  $background-5: false,
  $background-6: false,
  $background-7: false,
  $background-8: false,
  $background-9: false,
  $background-10: false
) {
  $backgrounds: compact($background-1, $background-2, $background-3, $background-4, $background-5,
                        $background-6, $background-7, $background-8, $background-9, $background-10);
  $mult-bgs: -compass-list-size($backgrounds) > 1;
  $simple-background: if($mult-bgs or prefixed(-css2, $backgrounds), -css2(-compass-nth($backgrounds, last)), false);
  @if not(blank($simple-background)) { background: $simple-background; }
  @include background($background-1, $background-2, $background-3, $background-4, $background-5,
                      $background-6, $background-7, $background-8, $background-9, $background-10);
}


// Background image property support for vendor prefixing within values.
@mixin background-image(
  $image-1,
  $image-2: false,
  $image-3: false,
  $image-4: false,
  $image-5: false,
  $image-6: false,
  $image-7: false,
  $image-8: false,
  $image-9: false,
  $image-10: false
) {
  $images: compact($image-1, $image-2, $image-3, $image-4, $image-5, $image-6, $image-7, $image-8, $image-9, $image-10);
  $add-pie-bg: prefixed(-pie,   $images) or -compass-list-size($images) > 1;

  @if $experimental-support-for-svg          and prefixed(-svg,    $images) { background-image:    -svg($images); background-size: 100%; }
  @if $support-for-original-webkit-gradients and prefixed(-owg,    $images) { background-image:    -owg($images); }
  @if $experimental-support-for-webkit       and prefixed(-webkit, $images) { background-image: -webkit($images); }
  @if $experimental-support-for-mozilla      and prefixed(-moz,    $images) { background-image:    -moz($images); }
  @if $experimental-support-for-opera        and prefixed(-o,      $images) { background-image:      -o($images); }
  @if $experimental-support-for-pie          and $add-pie-bg                { @warn "PIE does not support background-image. Use @include background(#{$images}) instead." }
                                                                              background-image:         $images ;
}

// Emit a IE-Specific filters that renders a simple linear gradient.
// For use in IE 6 - 8. Best practice would have you apply this via a
// conditional IE stylesheet, but if you must, you should place this before
// any background-image properties that you have specified.
//
// For the `$orientation` parameter, you can pass `vertical` or `horizontal`.
@mixin filter-gradient($start-color, $end-color, $orientation: vertical) {
  @include has-layout;
  $gradient-type: if($orientation == vertical, 0, 1);
  @if $legacy-support-for-ie6 or $legacy-support-for-ie7 or $legacy-support-for-ie8 {
    filter: progid:DXImageTransform.Microsoft.gradient(gradientType=#{$gradient-type}, startColorstr='#{ie-hex-str($start-color)}', endColorstr='#{ie-hex-str($end-color)}');
  }
}


// Border image property support for vendor prefixing properties and values.
@mixin border-image($value) {
  @if $experimental-support-for-mozilla      {    -moz-border-image:    -moz(reject(-compass-list($value), fill)); }
  @if $support-for-original-webkit-gradients { -webkit-border-image:    -owg(reject(-compass-list($value), fill)); }
  @if $experimental-support-for-webkit       { -webkit-border-image: -webkit(reject(-compass-list($value), fill)); }
  @if $experimental-support-for-opera        {      -o-border-image:      -o(reject(-compass-list($value), fill)); }
  @if $experimental-support-for-svg          {         border-image:    -svg(reject(-compass-list($value), fill)); }
                                                       border-image:                              $value;
}

// List style image property support for vendor prefixing within values.
@mixin list-style-image($image) {
  @if $experimental-support-for-mozilla      and prefixed(-moz,    $image) { list-style-image:    -moz($image); }
  @if $support-for-original-webkit-gradients and prefixed(-owg,    $image) { list-style-image:    -owg($image); }
  @if $experimental-support-for-webkit       and prefixed(-webkit, $image) { list-style-image: -webkit($image); }
  @if $experimental-support-for-opera        and prefixed(-o,      $image) { list-style-image:      -o($image); }
  @if $experimental-support-for-svg          and prefixed(-svg,    $image) { list-style-image:    -svg($image); }
                                                                             list-style-image:         $image ;
}

// List style property support for vendor prefixing within values.
@mixin list-style($value) {
  $value: -compass-list($value);
  @if $experimental-support-for-mozilla      and prefixed(-moz,    $value) { list-style-image:    -moz($value); }
  @if $support-for-original-webkit-gradients and prefixed(-owg,    $value) { list-style-image:    -owg($value); }
  @if $experimental-support-for-webkit       and prefixed(-webkit, $value) { list-style-image: -webkit($value); }
  @if $experimental-support-for-opera        and prefixed(-o,      $value) { list-style-image:      -o($value); }
  @if $experimental-support-for-svg          and prefixed(-svg,    $value) { list-style-image:    -svg($value); }
                                                                             list-style-image:         $value ;
}

// content property support for vendor prefixing within values.
@mixin content($value) {
  $value: -compass-list($value);
  @if $experimental-support-for-mozilla      and prefixed(-moz,    $value) { content:    -moz($value); }
  @if $support-for-original-webkit-gradients and prefixed(-owg,    $value) { content:    -owg($value); }
  @if $experimental-support-for-webkit       and prefixed(-webkit, $value) { content: -webkit($value); }
  @if $experimental-support-for-opera        and prefixed(-o,      $value) { content:      -o($value); }
  @if $experimental-support-for-svg          and prefixed(-svg,    $value) { content:    -svg($value); }
                                                                             content:         $value ;
}

// Usually compass hacks apply to both ie6 & 7 -- set this to false to disable support for both.
$legacy-support-for-ie: true !default;

// Setting this to false will result in smaller output, but no support for ie6 hacks
$legacy-support-for-ie6: $legacy-support-for-ie !default;

// Setting this to false will result in smaller output, but no support for ie7 hacks
$legacy-support-for-ie7: $legacy-support-for-ie !default;

// Setting this to false will result in smaller output, but no support for legacy ie8 hacks
$legacy-support-for-ie8: $legacy-support-for-ie !default;

// @private
// The user can simply set $legacy-support-for-ie and 6, 7, and 8 will be set accordingly,
// But in case the user set each of those explicitly, we need to sync the value of
// this combined variable.
$legacy-support-for-ie: $legacy-support-for-ie6 or $legacy-support-for-ie7 or $legacy-support-for-ie8;

// Whether to output legacy support for mozilla.
// Usually this means hacks to support Firefox 3.6 or earlier.
$legacy-support-for-mozilla: true;

// Support for mozilla in experimental css3 properties (-moz).
$experimental-support-for-mozilla      : true !default;
// Support for webkit in experimental css3 properties (-webkit).
$experimental-support-for-webkit       : true !default;
// Support for webkit's original (non-standard) gradient syntax.
$support-for-original-webkit-gradients : true !default;
// Support for opera in experimental css3 properties (-o).
$experimental-support-for-opera        : true !default;
// Support for microsoft in experimental css3 properties (-ms).
$experimental-support-for-microsoft    : true !default;
// Support for khtml in experimental css3 properties (-khtml).
$experimental-support-for-khtml        : false !default;
// Support for svg in experimental css3 properties.
// Setting this to true might add significant size to your
// generated stylesheets.
$experimental-support-for-svg          : false !default;
// Support for CSS PIE in experimental css3 properties (-pie).
$experimental-support-for-pie          : false !default;

// This mixin provides basic support for CSS3 properties and
// their corresponding experimental CSS2 properties when
// the implementations are identical except for the property
// prefix.
@mixin experimental($property, $value,
  $moz      : $experimental-support-for-mozilla,
  $webkit   : $experimental-support-for-webkit,
  $o        : $experimental-support-for-opera,
  $ms       : $experimental-support-for-microsoft,
  $khtml    : $experimental-support-for-khtml,
  $official : true
) {
  @if $webkit  and $experimental-support-for-webkit    { -webkit-#{$property} : $value; }
  @if $khtml   and $experimental-support-for-khtml     {  -khtml-#{$property} : $value; }
  @if $moz     and $experimental-support-for-mozilla   {    -moz-#{$property} : $value; }
  @if $ms      and $experimental-support-for-microsoft {     -ms-#{$property} : $value; }
  @if $o       and $experimental-support-for-opera     {      -o-#{$property} : $value; }
  @if $official                                        {         #{$property} : $value; }
}

// Same as experimental(), but for cases when the property is the same and the value is vendorized
@mixin experimental-value($property, $value,
  $moz      : $experimental-support-for-mozilla,
  $webkit   : $experimental-support-for-webkit,
  $o        : $experimental-support-for-opera,
  $ms       : $experimental-support-for-microsoft,
  $khtml    : $experimental-support-for-khtml,
  $official : true
) {
  @if $webkit  and $experimental-support-for-webkit    { #{$property} : -webkit-#{$value}; }
  @if $khtml   and $experimental-support-for-khtml     { #{$property} :  -khtml-#{$value}; }
  @if $moz     and $experimental-support-for-mozilla   { #{$property} :    -moz-#{$value}; }
  @if $ms      and $experimental-support-for-microsoft { #{$property} :     -ms-#{$value}; }
  @if $o       and $experimental-support-for-opera     { #{$property} :      -o-#{$value}; }
  @if $official                                        { #{$property} :         #{$value}; }
}

// The default value is `padding-box` -- the box model used by modern browsers.
//
// If you wish to do so, you can override the default constant with `border-box`
//
// To override to the default border-box model, use this code:
//     $default-background-clip: border-box

$default-background-clip: padding-box !default;

// Clip the background (image and color) at the edge of the padding or border.
//
// Legal Values:
//
//   * padding-box
//   * border-box
//   * text

@mixin background-clip($clip: $default-background-clip) {
  // webkit and mozilla use the deprecated short [border | padding]
  $clip: unquote($clip);
  $deprecated: $clip;
  @if $clip == padding-box { $deprecated: padding; }
  @if $clip == border-box { $deprecated: border; }
  // Support for webkit and mozilla's use of the deprecated short form
  @include experimental(background-clip, $deprecated,
    -moz,
    -webkit,
    not(-o),
    not(-ms),
    not(-khtml),
    not official
  );
  @include experimental(background-clip, $clip,
    not(-moz),
    not(-webkit),
    not(-o),
    not(-ms),
    -khtml,
    official
  );
}

// Override `$default-background-origin` to change the default.

// Usually compass hacks apply to both ie6 & 7 -- set this to false to disable support for both.
$legacy-support-for-ie: true !default;

// Setting this to false will result in smaller output, but no support for ie6 hacks
$legacy-support-for-ie6: $legacy-support-for-ie !default;

// Setting this to false will result in smaller output, but no support for ie7 hacks
$legacy-support-for-ie7: $legacy-support-for-ie !default;

// Setting this to false will result in smaller output, but no support for legacy ie8 hacks
$legacy-support-for-ie8: $legacy-support-for-ie !default;

// @private
// The user can simply set $legacy-support-for-ie and 6, 7, and 8 will be set accordingly,
// But in case the user set each of those explicitly, we need to sync the value of
// this combined variable.
$legacy-support-for-ie: $legacy-support-for-ie6 or $legacy-support-for-ie7 or $legacy-support-for-ie8;

// Whether to output legacy support for mozilla.
// Usually this means hacks to support Firefox 3.6 or earlier.
$legacy-support-for-mozilla: true;

// Support for mozilla in experimental css3 properties (-moz).
$experimental-support-for-mozilla      : true !default;
// Support for webkit in experimental css3 properties (-webkit).
$experimental-support-for-webkit       : true !default;
// Support for webkit's original (non-standard) gradient syntax.
$support-for-original-webkit-gradients : true !default;
// Support for opera in experimental css3 properties (-o).
$experimental-support-for-opera        : true !default;
// Support for microsoft in experimental css3 properties (-ms).
$experimental-support-for-microsoft    : true !default;
// Support for khtml in experimental css3 properties (-khtml).
$experimental-support-for-khtml        : false !default;
// Support for svg in experimental css3 properties.
// Setting this to true might add significant size to your
// generated stylesheets.
$experimental-support-for-svg          : false !default;
// Support for CSS PIE in experimental css3 properties (-pie).
$experimental-support-for-pie          : false !default;

// This mixin provides basic support for CSS3 properties and
// their corresponding experimental CSS2 properties when
// the implementations are identical except for the property
// prefix.
@mixin experimental($property, $value,
  $moz      : $experimental-support-for-mozilla,
  $webkit   : $experimental-support-for-webkit,
  $o        : $experimental-support-for-opera,
  $ms       : $experimental-support-for-microsoft,
  $khtml    : $experimental-support-for-khtml,
  $official : true
) {
  @if $webkit  and $experimental-support-for-webkit    { -webkit-#{$property} : $value; }
  @if $khtml   and $experimental-support-for-khtml     {  -khtml-#{$property} : $value; }
  @if $moz     and $experimental-support-for-mozilla   {    -moz-#{$property} : $value; }
  @if $ms      and $experimental-support-for-microsoft {     -ms-#{$property} : $value; }
  @if $o       and $experimental-support-for-opera     {      -o-#{$property} : $value; }
  @if $official                                        {         #{$property} : $value; }
}

// Same as experimental(), but for cases when the property is the same and the value is vendorized
@mixin experimental-value($property, $value,
  $moz      : $experimental-support-for-mozilla,
  $webkit   : $experimental-support-for-webkit,
  $o        : $experimental-support-for-opera,
  $ms       : $experimental-support-for-microsoft,
  $khtml    : $experimental-support-for-khtml,
  $official : true
) {
  @if $webkit  and $experimental-support-for-webkit    { #{$property} : -webkit-#{$value}; }
  @if $khtml   and $experimental-support-for-khtml     { #{$property} :  -khtml-#{$value}; }
  @if $moz     and $experimental-support-for-mozilla   { #{$property} :    -moz-#{$value}; }
  @if $ms      and $experimental-support-for-microsoft { #{$property} :     -ms-#{$value}; }
  @if $o       and $experimental-support-for-opera     { #{$property} :      -o-#{$value}; }
  @if $official                                        { #{$property} :         #{$value}; }
}

$default-background-origin: content-box !default;

// Position the background off the edge of the padding, border or content
//
// * Possible values:
//   * `padding-box`
//   * `border-box`
//   * `content-box`
// * browser defaults to `padding-box`
// * mixin defaults to `content-box`


@mixin background-origin($origin: $default-background-origin) {
  $origin: unquote($origin);
  // webkit and mozilla use the deprecated short [border | padding | content]
  $deprecated: $origin;
  @if $origin == padding-box { $deprecated: padding; }
  @if $origin == border-box  { $deprecated: border;  }
  @if $origin == content-box { $deprecated: content; }

  // Support for webkit and mozilla's use of the deprecated short form
  @include experimental(background-origin, $deprecated,
    -moz,
    -webkit,
    not(-o),
    not(-ms),
    not(-khtml),
    not official
  );
  @include experimental(background-origin, $origin,
    not(-moz),
    not(-webkit),
    -o,
    -ms,
    -khtml,
    official
  );
}

// Usually compass hacks apply to both ie6 & 7 -- set this to false to disable support for both.
$legacy-support-for-ie: true !default;

// Setting this to false will result in smaller output, but no support for ie6 hacks
$legacy-support-for-ie6: $legacy-support-for-ie !default;

// Setting this to false will result in smaller output, but no support for ie7 hacks
$legacy-support-for-ie7: $legacy-support-for-ie !default;

// Setting this to false will result in smaller output, but no support for legacy ie8 hacks
$legacy-support-for-ie8: $legacy-support-for-ie !default;

// @private
// The user can simply set $legacy-support-for-ie and 6, 7, and 8 will be set accordingly,
// But in case the user set each of those explicitly, we need to sync the value of
// this combined variable.
$legacy-support-for-ie: $legacy-support-for-ie6 or $legacy-support-for-ie7 or $legacy-support-for-ie8;

// Whether to output legacy support for mozilla.
// Usually this means hacks to support Firefox 3.6 or earlier.
$legacy-support-for-mozilla: true;

// Support for mozilla in experimental css3 properties (-moz).
$experimental-support-for-mozilla      : true !default;
// Support for webkit in experimental css3 properties (-webkit).
$experimental-support-for-webkit       : true !default;
// Support for webkit's original (non-standard) gradient syntax.
$support-for-original-webkit-gradients : true !default;
// Support for opera in experimental css3 properties (-o).
$experimental-support-for-opera        : true !default;
// Support for microsoft in experimental css3 properties (-ms).
$experimental-support-for-microsoft    : true !default;
// Support for khtml in experimental css3 properties (-khtml).
$experimental-support-for-khtml        : false !default;
// Support for svg in experimental css3 properties.
// Setting this to true might add significant size to your
// generated stylesheets.
$experimental-support-for-svg          : false !default;
// Support for CSS PIE in experimental css3 properties (-pie).
$experimental-support-for-pie          : false !default;

// This mixin provides basic support for CSS3 properties and
// their corresponding experimental CSS2 properties when
// the implementations are identical except for the property
// prefix.
@mixin experimental($property, $value,
  $moz      : $experimental-support-for-mozilla,
  $webkit   : $experimental-support-for-webkit,
  $o        : $experimental-support-for-opera,
  $ms       : $experimental-support-for-microsoft,
  $khtml    : $experimental-support-for-khtml,
  $official : true
) {
  @if $webkit  and $experimental-support-for-webkit    { -webkit-#{$property} : $value; }
  @if $khtml   and $experimental-support-for-khtml     {  -khtml-#{$property} : $value; }
  @if $moz     and $experimental-support-for-mozilla   {    -moz-#{$property} : $value; }
  @if $ms      and $experimental-support-for-microsoft {     -ms-#{$property} : $value; }
  @if $o       and $experimental-support-for-opera     {      -o-#{$property} : $value; }
  @if $official                                        {         #{$property} : $value; }
}

// Same as experimental(), but for cases when the property is the same and the value is vendorized
@mixin experimental-value($property, $value,
  $moz      : $experimental-support-for-mozilla,
  $webkit   : $experimental-support-for-webkit,
  $o        : $experimental-support-for-opera,
  $ms       : $experimental-support-for-microsoft,
  $khtml    : $experimental-support-for-khtml,
  $official : true
) {
  @if $webkit  and $experimental-support-for-webkit    { #{$property} : -webkit-#{$value}; }
  @if $khtml   and $experimental-support-for-khtml     { #{$property} :  -khtml-#{$value}; }
  @if $moz     and $experimental-support-for-mozilla   { #{$property} :    -moz-#{$value}; }
  @if $ms      and $experimental-support-for-microsoft { #{$property} :     -ms-#{$value}; }
  @if $o       and $experimental-support-for-opera     { #{$property} :      -o-#{$value}; }
  @if $official                                        { #{$property} :         #{$value}; }
}

//  override to change the default
$default-background-size: 100% auto !default;

// Set the size of background images using px, width and height, or percentages.
// Currently supported in: Opera, Gecko, Webkit.
//
// * percentages are relative to the background-origin (default = padding-box)
// * mixin defaults to: `$default-background-size`
@mixin background-size(
  $size-1: $default-background-size,
  $size-2: false,
  $size-3: false,
  $size-4: false,
  $size-5: false,
  $size-6: false,
  $size-7: false,
  $size-8: false,
  $size-9: false,
  $size-10: false
) {
  $size-1: if(type-of($size-1) == string, unquote($size-1), $size-1);
  $sizes: compact($size-1, $size-2, $size-3, $size-4, $size-5, $size-6, $size-7, $size-8, $size-9, $size-10);
  @include experimental(background-size, $sizes, -moz, -webkit, -o, not(-ms), not(-khtml));
}

// Usually compass hacks apply to both ie6 & 7 -- set this to false to disable support for both.
$legacy-support-for-ie: true !default;

// Setting this to false will result in smaller output, but no support for ie6 hacks
$legacy-support-for-ie6: $legacy-support-for-ie !default;

// Setting this to false will result in smaller output, but no support for ie7 hacks
$legacy-support-for-ie7: $legacy-support-for-ie !default;

// Setting this to false will result in smaller output, but no support for legacy ie8 hacks
$legacy-support-for-ie8: $legacy-support-for-ie !default;

// @private
// The user can simply set $legacy-support-for-ie and 6, 7, and 8 will be set accordingly,
// But in case the user set each of those explicitly, we need to sync the value of
// this combined variable.
$legacy-support-for-ie: $legacy-support-for-ie6 or $legacy-support-for-ie7 or $legacy-support-for-ie8;

// Whether to output legacy support for mozilla.
// Usually this means hacks to support Firefox 3.6 or earlier.
$legacy-support-for-mozilla: true;

// Support for mozilla in experimental css3 properties (-moz).
$experimental-support-for-mozilla      : true !default;
// Support for webkit in experimental css3 properties (-webkit).
$experimental-support-for-webkit       : true !default;
// Support for webkit's original (non-standard) gradient syntax.
$support-for-original-webkit-gradients : true !default;
// Support for opera in experimental css3 properties (-o).
$experimental-support-for-opera        : true !default;
// Support for microsoft in experimental css3 properties (-ms).
$experimental-support-for-microsoft    : true !default;
// Support for khtml in experimental css3 properties (-khtml).
$experimental-support-for-khtml        : false !default;
// Support for svg in experimental css3 properties.
// Setting this to true might add significant size to your
// generated stylesheets.
$experimental-support-for-svg          : false !default;
// Support for CSS PIE in experimental css3 properties (-pie).
$experimental-support-for-pie          : false !default;

// This mixin provides basic support for CSS3 properties and
// their corresponding experimental CSS2 properties when
// the implementations are identical except for the property
// prefix.
@mixin experimental($property, $value,
  $moz      : $experimental-support-for-mozilla,
  $webkit   : $experimental-support-for-webkit,
  $o        : $experimental-support-for-opera,
  $ms       : $experimental-support-for-microsoft,
  $khtml    : $experimental-support-for-khtml,
  $official : true
) {
  @if $webkit  and $experimental-support-for-webkit    { -webkit-#{$property} : $value; }
  @if $khtml   and $experimental-support-for-khtml     {  -khtml-#{$property} : $value; }
  @if $moz     and $experimental-support-for-mozilla   {    -moz-#{$property} : $value; }
  @if $ms      and $experimental-support-for-microsoft {     -ms-#{$property} : $value; }
  @if $o       and $experimental-support-for-opera     {      -o-#{$property} : $value; }
  @if $official                                        {         #{$property} : $value; }
}

// Same as experimental(), but for cases when the property is the same and the value is vendorized
@mixin experimental-value($property, $value,
  $moz      : $experimental-support-for-mozilla,
  $webkit   : $experimental-support-for-webkit,
  $o        : $experimental-support-for-opera,
  $ms       : $experimental-support-for-microsoft,
  $khtml    : $experimental-support-for-khtml,
  $official : true
) {
  @if $webkit  and $experimental-support-for-webkit    { #{$property} : -webkit-#{$value}; }
  @if $khtml   and $experimental-support-for-khtml     { #{$property} :  -khtml-#{$value}; }
  @if $moz     and $experimental-support-for-mozilla   { #{$property} :    -moz-#{$value}; }
  @if $ms      and $experimental-support-for-microsoft { #{$property} :     -ms-#{$value}; }
  @if $o       and $experimental-support-for-opera     { #{$property} :      -o-#{$value}; }
  @if $official                                        { #{$property} :         #{$value}; }
}

// Cross-browser support for @font-face. Supports IE, Gecko, Webkit, Opera.
//
// * $name is required, arbitrary, and what you will use in font stacks.
// * $font-files is required using font-files('relative/location', 'format').
//   for best results use this order: woff, opentype/truetype, svg
// * $eot is required by IE, and is a relative location of the eot file.
// * $weight shows if the font is bold, defaults to normal
// * $style defaults to normal, might be also italic
// * For android 2.2 Compatiblity, please ensure that your web page has
//   a meta viewport tag.
// * To support iOS < 4.2, an SVG file must be provided
//
// If you need to generate other formats check out the Font Squirrel
// [font generator](http://www.fontsquirrel.com/fontface/generator)
//

// In order to refer to a specific style of the font in your stylesheets as 
// e.g. "font-style: italic;",  you may add a couple of @font-face includes
// containing the respective font files for each style and specying
// respective the $style parameter.

// Order of the includes matters, and it is: normal, bold, italic, bold+italic.

@mixin font-face(
  $name, 
  $font-files, 
  $eot: false,
  $weight: false,
  $style: false
) {
  $iefont: unquote("#{$eot}?#iefix");
  @font-face {
    font-family: quote($name);
    @if $eot {
      src: font-url($eot);
      $font-files: font-url($iefont) unquote("format('eot')"), $font-files; 
    }
    src: $font-files;
    @if $weight {
      font-weight: $weight;
    }
    @if $style {
      font-style: $style;
    }
  }
}

// Usually compass hacks apply to both ie6 & 7 -- set this to false to disable support for both.
$legacy-support-for-ie: true !default;

// Setting this to false will result in smaller output, but no support for ie6 hacks
$legacy-support-for-ie6: $legacy-support-for-ie !default;

// Setting this to false will result in smaller output, but no support for ie7 hacks
$legacy-support-for-ie7: $legacy-support-for-ie !default;

// Setting this to false will result in smaller output, but no support for legacy ie8 hacks
$legacy-support-for-ie8: $legacy-support-for-ie !default;

// @private
// The user can simply set $legacy-support-for-ie and 6, 7, and 8 will be set accordingly,
// But in case the user set each of those explicitly, we need to sync the value of
// this combined variable.
$legacy-support-for-ie: $legacy-support-for-ie6 or $legacy-support-for-ie7 or $legacy-support-for-ie8;

// Whether to output legacy support for mozilla.
// Usually this means hacks to support Firefox 3.6 or earlier.
$legacy-support-for-mozilla: true;

// Support for mozilla in experimental css3 properties (-moz).
$experimental-support-for-mozilla      : true !default;
// Support for webkit in experimental css3 properties (-webkit).
$experimental-support-for-webkit       : true !default;
// Support for webkit's original (non-standard) gradient syntax.
$support-for-original-webkit-gradients : true !default;
// Support for opera in experimental css3 properties (-o).
$experimental-support-for-opera        : true !default;
// Support for microsoft in experimental css3 properties (-ms).
$experimental-support-for-microsoft    : true !default;
// Support for khtml in experimental css3 properties (-khtml).
$experimental-support-for-khtml        : false !default;
// Support for svg in experimental css3 properties.
// Setting this to true might add significant size to your
// generated stylesheets.
$experimental-support-for-svg          : false !default;
// Support for CSS PIE in experimental css3 properties (-pie).
$experimental-support-for-pie          : false !default;

// This mixin provides basic support for CSS3 properties and
// their corresponding experimental CSS2 properties when
// the implementations are identical except for the property
// prefix.
@mixin experimental($property, $value,
  $moz      : $experimental-support-for-mozilla,
  $webkit   : $experimental-support-for-webkit,
  $o        : $experimental-support-for-opera,
  $ms       : $experimental-support-for-microsoft,
  $khtml    : $experimental-support-for-khtml,
  $official : true
) {
  @if $webkit  and $experimental-support-for-webkit    { -webkit-#{$property} : $value; }
  @if $khtml   and $experimental-support-for-khtml     {  -khtml-#{$property} : $value; }
  @if $moz     and $experimental-support-for-mozilla   {    -moz-#{$property} : $value; }
  @if $ms      and $experimental-support-for-microsoft {     -ms-#{$property} : $value; }
  @if $o       and $experimental-support-for-opera     {      -o-#{$property} : $value; }
  @if $official                                        {         #{$property} : $value; }
}

// Same as experimental(), but for cases when the property is the same and the value is vendorized
@mixin experimental-value($property, $value,
  $moz      : $experimental-support-for-mozilla,
  $webkit   : $experimental-support-for-webkit,
  $o        : $experimental-support-for-opera,
  $ms       : $experimental-support-for-microsoft,
  $khtml    : $experimental-support-for-khtml,
  $official : true
) {
  @if $webkit  and $experimental-support-for-webkit    { #{$property} : -webkit-#{$value}; }
  @if $khtml   and $experimental-support-for-khtml     { #{$property} :  -khtml-#{$value}; }
  @if $moz     and $experimental-support-for-mozilla   { #{$property} :    -moz-#{$value}; }
  @if $ms      and $experimental-support-for-microsoft { #{$property} :     -ms-#{$value}; }
  @if $o       and $experimental-support-for-opera     { #{$property} :      -o-#{$value}; }
  @if $official                                        { #{$property} :         #{$value}; }
}

// @doc off
// Note ----------------------------------------------------------------------
// Safari, Chrome, and Firefox all support 3D transforms. However,
// only in the most recent builds. You should also provide fallback 2d support for
// Opera and IE. IE10 is slated to have 3d enabled, but is currently unreleased.
// To make that easy, all 2D transforms include an browser-targeting toggle ($only3d)
// to switch between the two support lists. The toggle defaults to 'false' (2D),
// and also accepts 'true' (3D). Currently the lists are as follows:
// 2D: Mozilla, Webkit, Opera, Official
// 3D: Webkit, Firefox.

// Available Transforms ------------------------------------------------------
// - Scale (2d and 3d)
// - Rotate (2d and 3d)
// - Translate (2d and 3d)
// - Skew (2d only)

// Transform Parameters ------------------------------------------------------
// - Transform Origin (2d and 3d)
// - Perspective (3d)
// - Perspective Origin (3d)
// - Transform Style (3d)
// - Backface Visibility (3d)

// Mixins --------------------------------------------------------------------
// transform-origin
//  - shortcuts:  transform-origin2d, transform-origin3d
//  - helpers:    apply-origin
// transform
//  - shortcuts:  transform2d, transform3d
//  - helpers:    simple-transform, create-transform
// perspective
//  - helpers:    perspective-origin
// transform-style
// backface-visibility
// scale
//  - shortcuts:  scaleX, scaleY, scaleZ, scale3d
// rotate
//  - shortcuts:  rotateX, rotateY, rotate3d
// translate
//  - shortcuts:  translateX, translateY, translateZ, translate3d
// skew
//  - shortcuts:  skewX, skewY

// Defaults ------------------------------------------------------------------
// @doc on

// The default x-origin for transforms
$default-origin-x    : 50%                   !default;
// The default y-origin for transforms
$default-origin-y    : 50%                   !default;
// The default z-origin for transforms
$default-origin-z    : 50%                   !default;


// The default x-multiplier for scaling
$default-scale-x     : 1.25                  !default;
// The default y-multiplier for scaling
$default-scale-y     : $default-scale-x      !default;
// The default z-multiplier for scaling
$default-scale-z     : $default-scale-x      !default;


// The default angle for rotations
$default-rotate      : 45deg                 !default;


// The default x-vector for the axis of 3d rotations
$default-vector-x    : 1                     !default;
// The default y-vector for the axis of 3d rotations
$default-vector-y    : 1                     !default;
// The default z-vector for the axis of 3d rotations
$default-vector-z    : 1                     !default;


// The default x-length for translations
$default-translate-x : 1em                   !default;
// The default y-length for translations
$default-translate-y : $default-translate-x  !default;
// The default z-length for translations
$default-translate-z : $default-translate-x  !default;


// The default x-angle for skewing
$default-skew-x      : 5deg                  !default;
// The default y-angle for skewing
$default-skew-y      : 5deg                  !default;


// **Transform-origin**
// Transform-origin sent as a complete string
//
//     @include apply-origin( origin [, 3D-only ] )
//
// where 'origin' is a space separated list containing 1-3 (x/y/z) coordinates
// in percentages, absolute (px, cm, in, em etc..) or relative
// (left, top, right, bottom, center) units
//
// @param only3d Set this to true to only apply this
// mixin where browsers have 3D support.
@mixin apply-origin($origin, $only3d) {
  $only3d: $only3d or -compass-list-size(-compass-list($origin)) > 2;
  @if $only3d {
    @include experimental(transform-origin, $origin,
      -moz, -webkit, -o, -ms, not(-khtml), official
    );
  } @else {
    @include experimental(transform-origin, $origin,
      -moz, -webkit, -o, -ms, not(-khtml), official
    );
  }
}

// Transform-origin sent as individual arguments:
//
//     @include transform-origin( [ origin-x, origin-y, origin-z, 3D-only ] )
//
// where the 3 'origin-' arguments represent x/y/z coordinates.
//
// **NOTE:** setting z coordinates triggers 3D support list, leave false for 2D support
@mixin transform-origin(
  $origin-x: $default-origin-x,
  $origin-y: $default-origin-y,
  $origin-z: false,
  $only3d:   if($origin-z, true, false)
) {
  $origin: unquote('');
  @if $origin-x or $origin-y or $origin-z {
    @if $origin-x { $origin: $origin-x; } @else { $origin: 50%; }
    @if $origin-y { $origin: $origin $origin-y; } @else { @if $origin-z { $origin: $origin 50%; }}
    @if $origin-z { $origin: $origin $origin-z; }
    @include apply-origin($origin, $only3d);
  }
}


// Transform sent as a complete string:
//
//     @include transform( transforms [, 3D-only ] )
//
// where 'transforms' is a space separated list of all the transforms to be applied.
@mixin transform(
  $transform,
  $only3d: false
) {
  @if $only3d {
    @include experimental(transform, $transform,
      -moz, -webkit, -o, -ms, not(-khtml), official
    );
  } @else {
    @include experimental(transform, $transform,
      -moz, -webkit, -o, -ms, not(-khtml), official
    );
  }
}

// Shortcut to target all browsers with 2D transform support
@mixin transform2d($trans) {
  @include transform($trans, false);
}

// Shortcut to target only browsers with 3D transform support
@mixin transform3d($trans) {
  @include transform($trans, true);
}

// @doc off
// 3D Parameters -------------------------------------------------------------
// @doc on

// Set the perspective of 3D transforms on the children of an element:
//
//      @include perspective( perspective )
//
// where 'perspective' is a unitless number representing the depth of the
// z-axis. The higher the perspective, the more exaggerated the foreshortening.
// values from 500 to 1000 are more-or-less "normal" - a good starting-point.
@mixin perspective($p) {
  @include experimental(perspective, $p,
    -moz, -webkit, -o, -ms, not(-khtml), official
  );
}

// Set the origin position for the perspective
//
//      @include perspective-origin(origin-x [origin-y])
//
// where the two arguments represent x/y coordinates
@mixin perspective-origin($origin: 50%) {
  @include experimental(perspective-origin, $origin,
    -moz, -webkit, -o, -ms, not(-khtml), official
  );
}

// Determine whether a 3D objects children also live in the given 3D space
//
//      @include transform-style( [ style ] )
//
// where `style` can be either `flat` or `preserve-3d`.
// Browsers default to `flat`, mixin defaults to `preserve-3d`.
@mixin transform-style($style: preserve-3d) {
  @include experimental(transform-style, $style,
    -moz, -webkit, -o, -ms, not(-khtml), official
  );
}

// Determine the visibility of an element when it's back is turned
//
//     @include backface-visibility( [ visibility ] )
//
// where `visibility` can be either `visible` or `hidden`.
// Browsers default to visible, mixin defaults to hidden
@mixin backface-visibility($visibility: hidden) {
  @include experimental(backface-visibility, $visibility,
    -moz, -webkit, -o, -ms, not(-khtml), official
  );
}

// @doc off
// Transform Partials --------------------------------------------------------
// These work well on their own, but they don't add to each other, they override.
// Use along with transform parameter mixins to adjust origin, perspective and style
// ---------------------------------------------------------------------------


// Scale ---------------------------------------------------------------------
// @doc on

// Scale an object along the x and y axis:
//
//      @include scale( [ scale-x, scale-y, perspective, 3D-only ] )
//
// where the 'scale-' arguments are unitless multipliers of the x and y dimensions
// and perspective, which works the same as the stand-alone perspective property/mixin
// but applies to the individual element (multiplied with any parent perspective)
//
// **Note** This mixin cannot be combined with other transform mixins.
@mixin scale(
  $scale-x:     $default-scale-x,
  $scale-y:     $scale-x,
  $perspective: false,
  $only3d:      false
) {
  $trans: scale($scale-x, $scale-y);
  @if $perspective { $trans: perspective($perspective) $trans; }
  @include transform($trans, $only3d);
}

// Scale an object along the x axis
// @include scaleX( [ scale-x, perspective, 3D-only ] )
//
// **Note** This mixin cannot be combined with other transform mixins.
@mixin scaleX(
  $scale:       $default-scale-x,
  $perspective: false,
  $only3d:      false
) {
  $trans: scaleX($scale);
  @if $perspective { $trans: perspective($perspective) $trans; }
  @include transform($trans, $only3d);
}

// Scale an object along the y axis
// @include scaleY( [ scale-y, perspective, 3D-only ] )
//
// **Note** This mixin cannot be combined with other transform mixins.
@mixin scaleY(
  $scale:       $default-scale-y,
  $perspective: false,
  $only3d:      false
) {
  $trans: scaleY($scale);
  @if $perspective { $trans: perspective($perspective) $trans; }
  @include transform($trans, $only3d);
}

// Scale an object along the z axis
// @include scaleZ( [ scale-z, perspective ] )
//
// **Note** This mixin cannot be combined with other transform mixins.
@mixin scaleZ(
  $scale: $default-scale-z,
  $perspective: false
) {
  $trans: scaleZ($scale);
  @if $perspective { $trans: perspective($perspective) $trans; }
  @include transform3d($trans);
}

// Scale and object along all three axis
// @include scale3d( [ scale-x, scale-y, scale-z, perspective ] )
//
// **Note** This mixin cannot be combined with other transform mixins.
@mixin scale3d(
  $scale-x:     $default-scale-x,
  $scale-y:     $default-scale-y,
  $scale-z:     $default-scale-z,
  $perspective: false
) {
  $trans: scale3d($scale-x, $scale-y, $scale-z);
  @if $perspective { $trans: perspective($perspective) $trans; }
  @include transform3d($trans);
}

// @doc off
// Rotate --------------------------------------------------------------------
// @doc on

// Rotate an object around the z axis  (2D)
// @include rotate( [ rotation, perspective, 3D-only ] )
// where 'rotation' is an angle set in degrees (deg) or radian (rad) units
//
// **Note** This mixin cannot be combined with other transform mixins.
@mixin rotate(
  $rotate:      $default-rotate,
  $perspective: false,
  $only3d:      false
) {
  $trans: rotate($rotate);
  @if $perspective { $trans: perspective($perspective) $trans; }
  @include transform($trans, $only3d);
}

// A longcut for 'rotate' in case you forget that 'z' is implied
//
// **Note** This mixin cannot be combined with other transform mixins.
@mixin rotateZ(
  $rotate:      $default-rotate,
  $perspective: false,
  $only3d:      false
) {
  @include rotate($rotate, $perspective, $only3d);
}

// Rotate an object around the x axis (3D)
// @include rotateX( [ rotation, perspective ] )
//
// **Note** This mixin cannot be combined with other transform mixins.
@mixin rotateX(
  $rotate: $default-rotate,
  $perspective: false
) {
  $trans: rotateX($rotate);
  @if $perspective { $trans: perspective($perspective) $trans; }
  @include transform3d($trans);
}

// Rotate an object around the y axis (3D)
// @include rotate( [ rotation, perspective ] )
//
// **Note** This mixin cannot be combined with other transform mixins.
@mixin rotateY(
  $rotate: $default-rotate,
  $perspective: false
) {
  $trans: rotateY($rotate);
  @if $perspective { $trans: perspective($perspective) $trans; }
  @include transform3d($trans);
}

// Rotate an object around an arbitrary axis (3D)
// @include rotate( [ vector-x, vector-y, vector-z, rotation, perspective ] )
// where the 'vector-' arguments accept unitless numbers.
// These numbers are not important on their own, but in relation to one another
// creating an axis from your transform-origin, along the axis of Xx = Yy = Zz.
//
// **Note** This mixin cannot be combined with other transform mixins.
@mixin rotate3d(
  $vector-x: $default-vector-x,
  $vector-y: $default-vector-y,
  $vector-z: $default-vector-z,
  $rotate: $default-rotate,
  $perspective: false
) {
  $trans: rotate3d($vector-x, $vector-y, $vector-z, $rotate);
  @if $perspective { $trans: perspective($perspective) $trans; }
  @include transform3d($trans);
}

// @doc off
// Translate -----------------------------------------------------------------
// @doc on

// Move an object along the x or y axis (2D)
// @include translate( [ translate-x, translate-y, perspective, 3D-only ] )
// where the 'translate-' arguments accept any distance in percentages or absolute (px, cm, in, em etc..) units.
//
// **Note** This mixin cannot be combined with other transform mixins.
@mixin translate(
  $translate-x: $default-translate-x,
  $translate-y: $default-translate-y,
  $perspective: false,
  $only3d:      false
) {
  $trans: translate($translate-x, $translate-y);
  @if $perspective { $trans: perspective($perspective) $trans; }
  @include transform($trans, $only3d);
}

// Move an object along the x axis (2D)
// @include translate( [ translate-x, perspective, 3D-only ] )
//
// **Note** This mixin cannot be combined with other transform mixins.
@mixin translateX(
  $trans-x:     $default-translate-x,
  $perspective: false,
  $only3d:      false
) {
  $trans: translateX($trans-x);
  @if $perspective { $trans: perspective($perspective) $trans; }
  @include transform($trans, $only3d);
}

// Move an object along the y axis (2D)
// @include translate( [ translate-y, perspective, 3D-only ] )
//
// **Note** This mixin cannot be combined with other transform mixins.
@mixin translateY(
  $trans-y:     $default-translate-y,
  $perspective: false,
  $only3d:      false
) {
  $trans: translateY($trans-y);
  @if $perspective { $trans: perspective($perspective) $trans; }
  @include transform($trans, $only3d);
}

// Move an object along the z axis (3D)
// @include translate( [ translate-z, perspective ] )
//
// **Note** This mixin cannot be combined with other transform mixins.
@mixin translateZ(
  $trans-z:     $default-translate-z,
  $perspective: false
) {
  $trans: translateZ($trans-z);
  @if $perspective { $trans: perspective($perspective) $trans; }
  @include transform3d($trans);
}

// Move an object along the x, y and z axis (3D)
// @include translate( [ translate-x, translate-y, translate-z, perspective ] )
//
// **Note** This mixin cannot be combined with other transform mixins.
@mixin translate3d(
  $translate-x: $default-translate-x,
  $translate-y: $default-translate-y,
  $translate-z: $default-translate-z,
  $perspective: false
) {
  $trans: translate3d($translate-x, $translate-y, $translate-z);
  @if $perspective { $trans: perspective($perspective) $trans; }
  @include transform3d($trans);
}

// @doc off
// Skew ----------------------------------------------------------------------
// @doc on

// Skew an element:
//
//     @include skew( [ skew-x, skew-y, 3D-only ] )
//
// where the 'skew-' arguments accept css angles in degrees (deg) or radian (rad) units.
//
// **Note** This mixin cannot be combined with other transform mixins.
@mixin skew(
  $skew-x: $default-skew-x,
  $skew-y: $default-skew-y,
  $only3d: false
) {
  $trans: skew($skew-x, $skew-y);
  @include transform($trans, $only3d);
}

// Skew an element along the x axiz
//
//     @include skew( [ skew-x, 3D-only ] )
//
// **Note** This mixin cannot be combined with other transform mixins.
@mixin skewX(
  $skew-x: $default-skew-x,
  $only3d: false
) {
  $trans: skewX($skew-x);
  @include transform($trans, $only3d);
}

// Skew an element along the y axis
//
//     @include skew( [ skew-y, 3D-only ] )
//
// **Note** This mixin cannot be combined with other transform mixins.
@mixin skewY(
  $skew-y: $default-skew-y,
  $only3d: false
) {
  $trans: skewY($skew-y);
  @include transform($trans, $only3d);
}


// Full transform mixins
// For settings any combination of transforms as arguments
// These are complex and not highly recommended for daily use. They are mainly
// here for backward-compatibility purposes.
//
// * they include origin adjustments
// * scale takes a multiplier (unitless), rotate and skew take degrees (deg)
//
// **Note** This mixin cannot be combined with other transform mixins.
@mixin create-transform(
  $perspective: false,
  $scale-x:     false,
  $scale-y:     false,
  $scale-z:     false,
  $rotate-x:    false,
  $rotate-y:    false,
  $rotate-z:    false,
  $rotate3d:    false,
  $trans-x:     false,
  $trans-y:     false,
  $trans-z:     false,
  $skew-x:      false,
  $skew-y:      false,
  $origin-x:    false,
  $origin-y:    false,
  $origin-z:    false,
  $only3d:      false
) {
  $trans: unquote("");

  // perspective
  @if $perspective { $trans: perspective($perspective) ; }

  // scale
  @if $scale-x and $scale-y {
    @if $scale-z { $trans: $trans scale3d($scale-x, $scale-y, $scale-z); }
    @else { $trans: $trans scale($scale-x, $scale-y); }
  } @else {
    @if $scale-x { $trans: $trans scaleX($scale-x); }
    @if $scale-y { $trans: $trans scaleY($scale-y); }
    @if $scale-z { $trans: $trans scaleZ($scale-z); }
  }

  // rotate
  @if $rotate-x { $trans: $trans rotateX($rotate-x); }
  @if $rotate-y { $trans: $trans rotateY($rotate-y); }
  @if $rotate-z { $trans: $trans rotateZ($rotate-z); }
  @if $rotate3d { $trans: $trans rotate3d($rotate3d); }

  // translate
  @if $trans-x and $trans-y {
    @if $trans-z { $trans: $trans translate3d($trans-x, $trans-y, $trans-z); }
    @else { $trans: $trans translate($trans-x, $trans-y); }
  } @else {
    @if $trans-x { $trans: $trans translateX($trans-x); }
    @if $trans-y { $trans: $trans translateY($trans-y); }
    @if $trans-z { $trans: $trans translateZ($trans-z); }
  }

  // skew
  @if $skew-x and $skew-y { $trans: $trans skew($skew-x, $skew-y); }
  @else {
    @if $skew-x { $trans: $trans skewX($skew-x); }
    @if $skew-y { $trans: $trans skewY($skew-y); }
  }

  // apply it!
  @include transform($trans, $only3d);
  @include transform-origin($origin-x, $origin-y, $origin-z, $only3d);
}


// A simplified set of options
// backwards-compatible with the previous version of the 'transform' mixin
@mixin simple-transform(
  $scale:    false,
  $rotate:   false,
  $trans-x:  false,
  $trans-y:  false,
  $skew-x:   false,
  $skew-y:   false,
  $origin-x: false,
  $origin-y: false
) {
  @include create-transform(
    false,
    $scale, $scale, false,
    false, false, $rotate, false,
    $trans-x, $trans-y, false,
    $skew-x, $skew-y,
    $origin-x, $origin-y, false,
    false
  );
}

// Usually compass hacks apply to both ie6 & 7 -- set this to false to disable support for both.
$legacy-support-for-ie: true !default;

// Setting this to false will result in smaller output, but no support for ie6 hacks
$legacy-support-for-ie6: $legacy-support-for-ie !default;

// Setting this to false will result in smaller output, but no support for ie7 hacks
$legacy-support-for-ie7: $legacy-support-for-ie !default;

// Setting this to false will result in smaller output, but no support for legacy ie8 hacks
$legacy-support-for-ie8: $legacy-support-for-ie !default;

// @private
// The user can simply set $legacy-support-for-ie and 6, 7, and 8 will be set accordingly,
// But in case the user set each of those explicitly, we need to sync the value of
// this combined variable.
$legacy-support-for-ie: $legacy-support-for-ie6 or $legacy-support-for-ie7 or $legacy-support-for-ie8;

// Whether to output legacy support for mozilla.
// Usually this means hacks to support Firefox 3.6 or earlier.
$legacy-support-for-mozilla: true;

// Support for mozilla in experimental css3 properties (-moz).
$experimental-support-for-mozilla      : true !default;
// Support for webkit in experimental css3 properties (-webkit).
$experimental-support-for-webkit       : true !default;
// Support for webkit's original (non-standard) gradient syntax.
$support-for-original-webkit-gradients : true !default;
// Support for opera in experimental css3 properties (-o).
$experimental-support-for-opera        : true !default;
// Support for microsoft in experimental css3 properties (-ms).
$experimental-support-for-microsoft    : true !default;
// Support for khtml in experimental css3 properties (-khtml).
$experimental-support-for-khtml        : false !default;
// Support for svg in experimental css3 properties.
// Setting this to true might add significant size to your
// generated stylesheets.
$experimental-support-for-svg          : false !default;
// Support for CSS PIE in experimental css3 properties (-pie).
$experimental-support-for-pie          : false !default;

// This mixin provides basic support for CSS3 properties and
// their corresponding experimental CSS2 properties when
// the implementations are identical except for the property
// prefix.
@mixin experimental($property, $value,
  $moz      : $experimental-support-for-mozilla,
  $webkit   : $experimental-support-for-webkit,
  $o        : $experimental-support-for-opera,
  $ms       : $experimental-support-for-microsoft,
  $khtml    : $experimental-support-for-khtml,
  $official : true
) {
  @if $webkit  and $experimental-support-for-webkit    { -webkit-#{$property} : $value; }
  @if $khtml   and $experimental-support-for-khtml     {  -khtml-#{$property} : $value; }
  @if $moz     and $experimental-support-for-mozilla   {    -moz-#{$property} : $value; }
  @if $ms      and $experimental-support-for-microsoft {     -ms-#{$property} : $value; }
  @if $o       and $experimental-support-for-opera     {      -o-#{$property} : $value; }
  @if $official                                        {         #{$property} : $value; }
}

// Same as experimental(), but for cases when the property is the same and the value is vendorized
@mixin experimental-value($property, $value,
  $moz      : $experimental-support-for-mozilla,
  $webkit   : $experimental-support-for-webkit,
  $o        : $experimental-support-for-opera,
  $ms       : $experimental-support-for-microsoft,
  $khtml    : $experimental-support-for-khtml,
  $official : true
) {
  @if $webkit  and $experimental-support-for-webkit    { #{$property} : -webkit-#{$value}; }
  @if $khtml   and $experimental-support-for-khtml     { #{$property} :  -khtml-#{$value}; }
  @if $moz     and $experimental-support-for-mozilla   { #{$property} :    -moz-#{$value}; }
  @if $ms      and $experimental-support-for-microsoft { #{$property} :     -ms-#{$value}; }
  @if $o       and $experimental-support-for-opera     { #{$property} :      -o-#{$value}; }
  @if $official                                        { #{$property} :         #{$value}; }
}

// CSS Transitions
// Currently only works in Webkit.
//
// * expected in CSS3, FireFox 3.6/7 and Opera Presto 2.3
// * We'll be prepared.
//
// Including this submodule sets following defaults for the mixins:
//
//     $default-transition-property : all
//     $default-transition-duration : 1s
//     $default-transition-function : false
//     $default-transition-delay    : false
//
// Override them if you like. Timing-function and delay are set to false for browser defaults (ease, 0s).

$default-transition-property: all !default;

$default-transition-duration: 1s !default;

$default-transition-function: false !default;

$default-transition-delay: false !default;

$transitionable-prefixed-values: transform, transform-origin !default;

// One or more properties to transition
//
// * for multiple, use a comma-delimited list
// * also accepts "all" or "none"

@mixin transition-property($property-1: $default-transition-property,
  $property-2 : false,
  $property-3 : false,
  $property-4 : false,
  $property-5 : false,
  $property-6 : false,
  $property-7 : false,
  $property-8 : false,
  $property-9 : false,
  $property-10: false
) {
  @if type-of($property-1) == string { $property-1: unquote($property-1); }
  $properties: compact($property-1, $property-2, $property-3, $property-4, $property-5, $property-6, $property-7, $property-8, $property-9, $property-10);
  @if $experimental-support-for-webkit    {       -webkit-transition-property : prefixed-for-transition(-webkit, $properties); }
  @if $experimental-support-for-mozilla   {          -moz-transition-property : prefixed-for-transition(-moz,    $properties); }
  @if $experimental-support-for-opera     {            -o-transition-property : prefixed-for-transition(-o,      $properties); }
                                                          transition-property : $properties;
}

// One or more durations in seconds
//
// * for multiple, use a comma-delimited list
// * these durations will affect the properties in the same list position

@mixin transition-duration($duration-1: $default-transition-duration,
  $duration-2 : false,
  $duration-3 : false,
  $duration-4 : false,
  $duration-5 : false,
  $duration-6 : false,
  $duration-7 : false,
  $duration-8 : false,
  $duration-9 : false,
  $duration-10: false
) {
  @if type-of($duration-1) == string { $duration-1: unquote($duration-1); }
  $durations: compact($duration-1, $duration-2, $duration-3, $duration-4, $duration-5, $duration-6, $duration-7, $duration-8, $duration-9, $duration-10);
  @include experimental(transition-duration, $durations,
    -moz, -webkit, -o, not(-ms), not(-khtml), official
  );
}

// One or more timing functions
//
// * [ ease | linear | ease-in | ease-out | ease-in-out | cubic-bezier(x1, y1, x2, y2)]
// * For multiple, use a comma-delimited list
// * These functions will effect the properties in the same list position

@mixin transition-timing-function($function-1: $default-transition-function,
  $function-2 : false,
  $function-3 : false,
  $function-4 : false,
  $function-5 : false,
  $function-6 : false,
  $function-7 : false,
  $function-8 : false,
  $function-9 : false,
  $function-10: false
) {
  $function-1: unquote($function-1);
  $functions: compact($function-1, $function-2, $function-3, $function-4, $function-5, $function-6, $function-7, $function-8, $function-9, $function-10);
  @include experimental(transition-timing-function, $functions,
    -moz, -webkit, -o, not(-ms), not(-khtml), official
  );
}

// One or more transition-delays in seconds
//
// * for multiple, use a comma-delimited list
// * these delays will effect the properties in the same list position

@mixin transition-delay($delay-1: $default-transition-delay,
  $delay-2 : false,
  $delay-3 : false,
  $delay-4 : false,
  $delay-5 : false,
  $delay-6 : false,
  $delay-7 : false,
  $delay-8 : false,
  $delay-9 : false,
  $delay-10: false
) {
  @if type-of($delay-1) == string { $delay-1: unquote($delay-1); }
  $delays: compact($delay-1, $delay-2, $delay-3, $delay-4, $delay-5, $delay-6, $delay-7, $delay-8, $delay-9, $delay-10);
  @include experimental(transition-delay, $delays,
    -moz, -webkit, -o, not(-ms), not(-khtml), official
  );
}

// Transition all-in-one shorthand

@mixin single-transition(
  $property: $default-transition-property,
  $duration: $default-transition-duration,
  $function: $default-transition-function,
  $delay: $default-transition-delay
) {
  @include transition(compact($property $duration $function $delay));
}

@mixin transition(
  $transition-1 : default,
  $transition-2 : false,
  $transition-3 : false,
  $transition-4 : false,
  $transition-5 : false,
  $transition-6 : false,
  $transition-7 : false,
  $transition-8 : false,
  $transition-9 : false,
  $transition-10: false
) {
  @if $transition-1 == default {
    $transition-1 : compact($default-transition-property $default-transition-duration $default-transition-function $default-transition-delay);
  }
  $transitions: false;
  @if type-of($transition-1) == list and type-of(nth($transition-1,1)) == list {
    $transitions: join($transition-1, compact($transition-2, $transition-3, $transition-4, $transition-5, $transition-6, $transition-7, $transition-8, $transition-9, $transition-10), comma);
  } @else {
    $transitions : compact($transition-1, $transition-2, $transition-3, $transition-4, $transition-5, $transition-6, $transition-7, $transition-8, $transition-9, $transition-10);
  }
  $delays: comma-list();
  $has-delays: false;
  $webkit-value: comma-list();
  $moz-value: comma-list();
  $o-value: comma-list();

  // This block can be made considerably simpler at the point in time that
  // we no longer need to deal with the differences in how delays are treated.
  @each $transition in $transitions {
    // Extract the values from the list
    // (this would be cleaner if nth took a 3rd argument to provide a default value).
    $property: nth($transition, 1);
    $duration: false;
    $timing-function: false;
    $delay: false;
    @if length($transition) > 1 { $duration:        nth($transition, 2); }
    @if length($transition) > 2 { $timing-function: nth($transition, 3); }
    @if length($transition) > 3 { $delay:           nth($transition, 4); $has-delays: true; }

    // If a delay is provided without a timing function
    @if is-time($timing-function) and not($delay) { $delay: $timing-function; $timing-function: false; $has-delays: true; }

    // Keep a list of delays in case one is specified
    $delays: append($delays, if($delay, $delay, 0s));

    $webkit-value: append($webkit-value, compact((prefixed-for-transition(-webkit, $property) $duration $timing-function)...));
       $moz-value: append(   $moz-value, compact((prefixed-for-transition(   -moz, $property) $duration $timing-function $delay)...));
         $o-value: append(     $o-value, compact((prefixed-for-transition(     -o, $property) $duration $timing-function $delay)...));
  }

  @if $experimental-support-for-webkit    {       -webkit-transition : $webkit-value;
    // old webkit doesn't support the delay parameter in the shorthand so we progressively enhance it.
    @if $has-delays                       { -webkit-transition-delay : $delays;       } }
  @if $experimental-support-for-mozilla   {          -moz-transition : $moz-value;    }
  @if $experimental-support-for-opera     {            -o-transition : $o-value;      }
                                                          transition : $transitions;
}

// coerce a list to be comma delimited or make a new, empty comma delimited list.
@function comma-list($list: ()) {
  @return join((), $list, comma);
}

// Returns `$property` with the given prefix if it is found in `$transitionable-prefixed-values`.
@function prefixed-for-transition($prefix, $property) {
  @if type-of($property) == list {
    $new-list: comma-list();
    @each $v in $property {
      $new-list: append($new-list, prefixed-for-transition($prefix, $v));
    }
    @return $new-list;
  } @else {
    @if index($transitionable-prefixed-values, $property) {
      @return #{$prefix}-#{$property};
    } @else {
      @return $property;
    }
  }
}

// Checks if the value given is a unit of time.
@function is-time($value) {
  @if type-of($value) == number {
    @return not(not(index(s ms, unit($value))));
  } @else {
    @return false;
  }
}

// Usually compass hacks apply to both ie6 & 7 -- set this to false to disable support for both.
$legacy-support-for-ie: true !default;

// Setting this to false will result in smaller output, but no support for ie6 hacks
$legacy-support-for-ie6: $legacy-support-for-ie !default;

// Setting this to false will result in smaller output, but no support for ie7 hacks
$legacy-support-for-ie7: $legacy-support-for-ie !default;

// Setting this to false will result in smaller output, but no support for legacy ie8 hacks
$legacy-support-for-ie8: $legacy-support-for-ie !default;

// @private
// The user can simply set $legacy-support-for-ie and 6, 7, and 8 will be set accordingly,
// But in case the user set each of those explicitly, we need to sync the value of
// this combined variable.
$legacy-support-for-ie: $legacy-support-for-ie6 or $legacy-support-for-ie7 or $legacy-support-for-ie8;

// Whether to output legacy support for mozilla.
// Usually this means hacks to support Firefox 3.6 or earlier.
$legacy-support-for-mozilla: true;

// Support for mozilla in experimental css3 properties (-moz).
$experimental-support-for-mozilla      : true !default;
// Support for webkit in experimental css3 properties (-webkit).
$experimental-support-for-webkit       : true !default;
// Support for webkit's original (non-standard) gradient syntax.
$support-for-original-webkit-gradients : true !default;
// Support for opera in experimental css3 properties (-o).
$experimental-support-for-opera        : true !default;
// Support for microsoft in experimental css3 properties (-ms).
$experimental-support-for-microsoft    : true !default;
// Support for khtml in experimental css3 properties (-khtml).
$experimental-support-for-khtml        : false !default;
// Support for svg in experimental css3 properties.
// Setting this to true might add significant size to your
// generated stylesheets.
$experimental-support-for-svg          : false !default;
// Support for CSS PIE in experimental css3 properties (-pie).
$experimental-support-for-pie          : false !default;

// This mixin provides basic support for CSS3 properties and
// their corresponding experimental CSS2 properties when
// the implementations are identical except for the property
// prefix.
@mixin experimental($property, $value,
  $moz      : $experimental-support-for-mozilla,
  $webkit   : $experimental-support-for-webkit,
  $o        : $experimental-support-for-opera,
  $ms       : $experimental-support-for-microsoft,
  $khtml    : $experimental-support-for-khtml,
  $official : true
) {
  @if $webkit  and $experimental-support-for-webkit    { -webkit-#{$property} : $value; }
  @if $khtml   and $experimental-support-for-khtml     {  -khtml-#{$property} : $value; }
  @if $moz     and $experimental-support-for-mozilla   {    -moz-#{$property} : $value; }
  @if $ms      and $experimental-support-for-microsoft {     -ms-#{$property} : $value; }
  @if $o       and $experimental-support-for-opera     {      -o-#{$property} : $value; }
  @if $official                                        {         #{$property} : $value; }
}

// Same as experimental(), but for cases when the property is the same and the value is vendorized
@mixin experimental-value($property, $value,
  $moz      : $experimental-support-for-mozilla,
  $webkit   : $experimental-support-for-webkit,
  $o        : $experimental-support-for-opera,
  $ms       : $experimental-support-for-microsoft,
  $khtml    : $experimental-support-for-khtml,
  $official : true
) {
  @if $webkit  and $experimental-support-for-webkit    { #{$property} : -webkit-#{$value}; }
  @if $khtml   and $experimental-support-for-khtml     { #{$property} :  -khtml-#{$value}; }
  @if $moz     and $experimental-support-for-mozilla   { #{$property} :    -moz-#{$value}; }
  @if $ms      and $experimental-support-for-microsoft { #{$property} :     -ms-#{$value}; }
  @if $o       and $experimental-support-for-opera     { #{$property} :      -o-#{$value}; }
  @if $official                                        { #{$property} :         #{$value}; }
}

// Change the appearance for Mozilla, Webkit and possibly the future.
// The appearance property is currently not present in any newer CSS specification.
//
// There is no official list of accepted values, but you might check these source:
//   Mozilla : https://developer.mozilla.org/en/CSS/-moz-appearance
//   Webkit  : http://code.google.com/p/webkit-mirror/source/browse/Source/WebCore/css/CSSValueKeywords.in?spec=svnf1aea559dcd025a8946aa7da6e4e8306f5c1b604&r=63c7d1af44430b314233fea342c3ddb2a052e365
//   (search for 'appearance' within the page)

@mixin appearance($ap) {
  $ap: unquote($ap);
  @include experimental(appearance, $ap,
    -moz, -webkit, not(-o), not(-ms), not(-khtml), official
  );
}

// Usually compass hacks apply to both ie6 & 7 -- set this to false to disable support for both.
$legacy-support-for-ie: true !default;

// Setting this to false will result in smaller output, but no support for ie6 hacks
$legacy-support-for-ie6: $legacy-support-for-ie !default;

// Setting this to false will result in smaller output, but no support for ie7 hacks
$legacy-support-for-ie7: $legacy-support-for-ie !default;

// Setting this to false will result in smaller output, but no support for legacy ie8 hacks
$legacy-support-for-ie8: $legacy-support-for-ie !default;

// @private
// The user can simply set $legacy-support-for-ie and 6, 7, and 8 will be set accordingly,
// But in case the user set each of those explicitly, we need to sync the value of
// this combined variable.
$legacy-support-for-ie: $legacy-support-for-ie6 or $legacy-support-for-ie7 or $legacy-support-for-ie8;

// Whether to output legacy support for mozilla.
// Usually this means hacks to support Firefox 3.6 or earlier.
$legacy-support-for-mozilla: true;

// Support for mozilla in experimental css3 properties (-moz).
$experimental-support-for-mozilla      : true !default;
// Support for webkit in experimental css3 properties (-webkit).
$experimental-support-for-webkit       : true !default;
// Support for webkit's original (non-standard) gradient syntax.
$support-for-original-webkit-gradients : true !default;
// Support for opera in experimental css3 properties (-o).
$experimental-support-for-opera        : true !default;
// Support for microsoft in experimental css3 properties (-ms).
$experimental-support-for-microsoft    : true !default;
// Support for khtml in experimental css3 properties (-khtml).
$experimental-support-for-khtml        : false !default;
// Support for svg in experimental css3 properties.
// Setting this to true might add significant size to your
// generated stylesheets.
$experimental-support-for-svg          : false !default;
// Support for CSS PIE in experimental css3 properties (-pie).
$experimental-support-for-pie          : false !default;

// This mixin provides basic support for CSS3 properties and
// their corresponding experimental CSS2 properties when
// the implementations are identical except for the property
// prefix.
@mixin experimental($property, $value,
  $moz      : $experimental-support-for-mozilla,
  $webkit   : $experimental-support-for-webkit,
  $o        : $experimental-support-for-opera,
  $ms       : $experimental-support-for-microsoft,
  $khtml    : $experimental-support-for-khtml,
  $official : true
) {
  @if $webkit  and $experimental-support-for-webkit    { -webkit-#{$property} : $value; }
  @if $khtml   and $experimental-support-for-khtml     {  -khtml-#{$property} : $value; }
  @if $moz     and $experimental-support-for-mozilla   {    -moz-#{$property} : $value; }
  @if $ms      and $experimental-support-for-microsoft {     -ms-#{$property} : $value; }
  @if $o       and $experimental-support-for-opera     {      -o-#{$property} : $value; }
  @if $official                                        {         #{$property} : $value; }
}

// Same as experimental(), but for cases when the property is the same and the value is vendorized
@mixin experimental-value($property, $value,
  $moz      : $experimental-support-for-mozilla,
  $webkit   : $experimental-support-for-webkit,
  $o        : $experimental-support-for-opera,
  $ms       : $experimental-support-for-microsoft,
  $khtml    : $experimental-support-for-khtml,
  $official : true
) {
  @if $webkit  and $experimental-support-for-webkit    { #{$property} : -webkit-#{$value}; }
  @if $khtml   and $experimental-support-for-khtml     { #{$property} :  -khtml-#{$value}; }
  @if $moz     and $experimental-support-for-mozilla   { #{$property} :    -moz-#{$value}; }
  @if $ms      and $experimental-support-for-microsoft { #{$property} :     -ms-#{$value}; }
  @if $o       and $experimental-support-for-opera     { #{$property} :      -o-#{$value}; }
  @if $official                                        { #{$property} :         #{$value}; }
}

// Webkit, IE10 and future support for [CSS Regions](http://dev.w3.org/csswg/css3-regions/)
//
// $target is a value you use to link two regions of your css. Give the source of your content the flow-into property, and give your target container the flow-from property.
//
// For a visual explanation, see the diagrams at Chris Coyier's
// [CSS-Tricks](http://css-tricks.com/content-folding/)

@mixin flow-into($target) {
  $target: unquote($target);
  @include experimental(flow-into, $target,
    not(-moz), -webkit, not(-o), -ms, not(-khtml), not official
  );
}

@mixin flow-from($target) {
  $target: unquote($target);
  @include experimental(flow-from, $target,
    not(-moz), -webkit, not(-o), -ms, not(-khtml), not official
  );
}
// Usually compass hacks apply to both ie6 & 7 -- set this to false to disable support for both.
$legacy-support-for-ie: true !default;

// Setting this to false will result in smaller output, but no support for ie6 hacks
$legacy-support-for-ie6: $legacy-support-for-ie !default;

// Setting this to false will result in smaller output, but no support for ie7 hacks
$legacy-support-for-ie7: $legacy-support-for-ie !default;

// Setting this to false will result in smaller output, but no support for legacy ie8 hacks
$legacy-support-for-ie8: $legacy-support-for-ie !default;

// @private
// The user can simply set $legacy-support-for-ie and 6, 7, and 8 will be set accordingly,
// But in case the user set each of those explicitly, we need to sync the value of
// this combined variable.
$legacy-support-for-ie: $legacy-support-for-ie6 or $legacy-support-for-ie7 or $legacy-support-for-ie8;

// Whether to output legacy support for mozilla.
// Usually this means hacks to support Firefox 3.6 or earlier.
$legacy-support-for-mozilla: true;

// Support for mozilla in experimental css3 properties (-moz).
$experimental-support-for-mozilla      : true !default;
// Support for webkit in experimental css3 properties (-webkit).
$experimental-support-for-webkit       : true !default;
// Support for webkit's original (non-standard) gradient syntax.
$support-for-original-webkit-gradients : true !default;
// Support for opera in experimental css3 properties (-o).
$experimental-support-for-opera        : true !default;
// Support for microsoft in experimental css3 properties (-ms).
$experimental-support-for-microsoft    : true !default;
// Support for khtml in experimental css3 properties (-khtml).
$experimental-support-for-khtml        : false !default;
// Support for svg in experimental css3 properties.
// Setting this to true might add significant size to your
// generated stylesheets.
$experimental-support-for-svg          : false !default;
// Support for CSS PIE in experimental css3 properties (-pie).
$experimental-support-for-pie          : false !default;

// This mixin provides basic support for CSS3 properties and
// their corresponding experimental CSS2 properties when
// the implementations are identical except for the property
// prefix.
@mixin experimental($property, $value,
  $moz      : $experimental-support-for-mozilla,
  $webkit   : $experimental-support-for-webkit,
  $o        : $experimental-support-for-opera,
  $ms       : $experimental-support-for-microsoft,
  $khtml    : $experimental-support-for-khtml,
  $official : true
) {
  @if $webkit  and $experimental-support-for-webkit    { -webkit-#{$property} : $value; }
  @if $khtml   and $experimental-support-for-khtml     {  -khtml-#{$property} : $value; }
  @if $moz     and $experimental-support-for-mozilla   {    -moz-#{$property} : $value; }
  @if $ms      and $experimental-support-for-microsoft {     -ms-#{$property} : $value; }
  @if $o       and $experimental-support-for-opera     {      -o-#{$property} : $value; }
  @if $official                                        {         #{$property} : $value; }
}

// Same as experimental(), but for cases when the property is the same and the value is vendorized
@mixin experimental-value($property, $value,
  $moz      : $experimental-support-for-mozilla,
  $webkit   : $experimental-support-for-webkit,
  $o        : $experimental-support-for-opera,
  $ms       : $experimental-support-for-microsoft,
  $khtml    : $experimental-support-for-khtml,
  $official : true
) {
  @if $webkit  and $experimental-support-for-webkit    { #{$property} : -webkit-#{$value}; }
  @if $khtml   and $experimental-support-for-khtml     { #{$property} :  -khtml-#{$value}; }
  @if $moz     and $experimental-support-for-mozilla   { #{$property} :    -moz-#{$value}; }
  @if $ms      and $experimental-support-for-microsoft { #{$property} :     -ms-#{$value}; }
  @if $o       and $experimental-support-for-opera     { #{$property} :      -o-#{$value}; }
  @if $official                                        { #{$property} :         #{$value}; }
}

// Mixins to support specific CSS Text Level 3 elements
//
//
//
// Mixin for word-break properties
// http://www.w3.org/css3-text/#word-break
// * legal values for $type : normal, keep-all, break-all
//
// Example:
//    p.wordBreak {@include word-break(break-all);}
//
// Which generates:
//    p.wordBreak {
//      -ms-word-break: break-all;
//      word-break: break-all;
//      word-break: break-word;}
//
@mixin word-break($value: normal){
  @if $value == break-all {
    //Most browsers handle the break-all case the same...
    @include experimental(word-break, $value,
      not(-moz), not(-webkit), not(-o), -ms, not(-khtml), official
    );
    //Webkit handles break-all differently... as break-word
    @include experimental(word-break, break-word,
      not(-moz), not(-webkit), not(-o), not(-ms), not(-khtml), official
    );
  }
  @else {
    @include experimental(word-break, $value,
      not(-moz), not(-webkit), not(-o), -ms, not(-khtml), official
    );
  }
}

// Mixin for the hyphens property
//
// W3C specification: http://www.w3.org/TR/css3-text/#hyphens
// * legal values for $type : auto, manual, none
//
// Example:
//  p {
//    @include hyphens(auto);}
// Which generates:
//  p {
//    -moz-hyphens: auto;
//    -webkit-hyphens: auto;
//    hyphens: auto;}
//
@mixin hyphens($value: auto){
  @include experimental(hyphens, $value,
    -moz, -webkit, not(-o), not(-ms), not(-khtml), official
  );
}

// Mixin for x-browser hyphenation based on @auchenberg's post:
// Removes the need for the <wbr/> HTML tag
// http://blog.kenneth.io/blog/2012/03/04/word-wrapping-hypernation-using-css/
//
//  Example:
//  div {@include hyphenation;}
//
//  Which generates:
//    div {
//      -ms-word-break: break-all;
//      word-break: break-all;
//      word-break: break-word;
//      -moz-hyphens: auto;
//      -webkit-hyphens: auto;
//      hyphens: auto;}
//
@mixin hyphenation{
  @include word-break(break-all);
  @include hyphens;
}

// Usually compass hacks apply to both ie6 & 7 -- set this to false to disable support for both.
$legacy-support-for-ie: true !default;

// Setting this to false will result in smaller output, but no support for ie6 hacks
$legacy-support-for-ie6: $legacy-support-for-ie !default;

// Setting this to false will result in smaller output, but no support for ie7 hacks
$legacy-support-for-ie7: $legacy-support-for-ie !default;

// Setting this to false will result in smaller output, but no support for legacy ie8 hacks
$legacy-support-for-ie8: $legacy-support-for-ie !default;

// @private
// The user can simply set $legacy-support-for-ie and 6, 7, and 8 will be set accordingly,
// But in case the user set each of those explicitly, we need to sync the value of
// this combined variable.
$legacy-support-for-ie: $legacy-support-for-ie6 or $legacy-support-for-ie7 or $legacy-support-for-ie8;

// Whether to output legacy support for mozilla.
// Usually this means hacks to support Firefox 3.6 or earlier.
$legacy-support-for-mozilla: true;

// Support for mozilla in experimental css3 properties (-moz).
$experimental-support-for-mozilla      : true !default;
// Support for webkit in experimental css3 properties (-webkit).
$experimental-support-for-webkit       : true !default;
// Support for webkit's original (non-standard) gradient syntax.
$support-for-original-webkit-gradients : true !default;
// Support for opera in experimental css3 properties (-o).
$experimental-support-for-opera        : true !default;
// Support for microsoft in experimental css3 properties (-ms).
$experimental-support-for-microsoft    : true !default;
// Support for khtml in experimental css3 properties (-khtml).
$experimental-support-for-khtml        : false !default;
// Support for svg in experimental css3 properties.
// Setting this to true might add significant size to your
// generated stylesheets.
$experimental-support-for-svg          : false !default;
// Support for CSS PIE in experimental css3 properties (-pie).
$experimental-support-for-pie          : false !default;

// This mixin provides basic support for CSS3 properties and
// their corresponding experimental CSS2 properties when
// the implementations are identical except for the property
// prefix.
@mixin experimental($property, $value,
  $moz      : $experimental-support-for-mozilla,
  $webkit   : $experimental-support-for-webkit,
  $o        : $experimental-support-for-opera,
  $ms       : $experimental-support-for-microsoft,
  $khtml    : $experimental-support-for-khtml,
  $official : true
) {
  @if $webkit  and $experimental-support-for-webkit    { -webkit-#{$property} : $value; }
  @if $khtml   and $experimental-support-for-khtml     {  -khtml-#{$property} : $value; }
  @if $moz     and $experimental-support-for-mozilla   {    -moz-#{$property} : $value; }
  @if $ms      and $experimental-support-for-microsoft {     -ms-#{$property} : $value; }
  @if $o       and $experimental-support-for-opera     {      -o-#{$property} : $value; }
  @if $official                                        {         #{$property} : $value; }
}

// Same as experimental(), but for cases when the property is the same and the value is vendorized
@mixin experimental-value($property, $value,
  $moz      : $experimental-support-for-mozilla,
  $webkit   : $experimental-support-for-webkit,
  $o        : $experimental-support-for-opera,
  $ms       : $experimental-support-for-microsoft,
  $khtml    : $experimental-support-for-khtml,
  $official : true
) {
  @if $webkit  and $experimental-support-for-webkit    { #{$property} : -webkit-#{$value}; }
  @if $khtml   and $experimental-support-for-khtml     { #{$property} :  -khtml-#{$value}; }
  @if $moz     and $experimental-support-for-mozilla   { #{$property} :    -moz-#{$value}; }
  @if $ms      and $experimental-support-for-microsoft { #{$property} :     -ms-#{$value}; }
  @if $o       and $experimental-support-for-opera     { #{$property} :      -o-#{$value}; }
  @if $official                                        { #{$property} :         #{$value}; }
}

// Provides cross-browser support for the upcoming (?) css3 filter property.
//
// Each filter argument should adhere to the standard css3 syntax for the
// filter property.
@mixin filter (
  $filter-1,
  $filter-2 : false,
  $filter-3 : false,
  $filter-4 : false,
  $filter-5 : false,
  $filter-6 : false,
  $filter-7 : false,
  $filter-8 : false,
  $filter-9 : false,
  $filter-10: false
) {
  $filter : compact($filter-1, $filter-2, $filter-3, $filter-4, $filter-5, $filter-6, $filter-7, $filter-8, $filter-9, $filter-10);
  @include experimental(filter, $filter,
    -moz, -webkit, not(-o), not(-ms), not(-khtml), official
  );
}

$experimental-support-for-pie: true !default;

// It is recommended that you use Sass's @extend directive to apply the behavior
// to your PIE elements. To assist you, Compass provides this variable.
// When set, it will cause the `@include pie` mixin to extend this class.
// The class name you provide should **not** include the `.`.
$pie-base-class: false !default;

// The default approach to using PIE.
// Can be one of:
//
// * relative (default)
// * z-index
// * none
$pie-default-approach: relative !default;

// The location of your PIE behavior file
// This should be root-relative to your web server
// relative assets don't work. It is recommended that
// you set this yourself.
$pie-behavior: stylesheet-url("PIE.htc") !default;

// When using the z-index approach, the
// first ancestor of the PIE element at
// or before the container's opaque background
// should have a z-index set as well to ensure
// propert z-index stacking.
//
// The `$position` argument must be some non-static
// value (absolute, relative, etc.)
@mixin pie-container($z-index: 0, $position: relative) {
  z-index: $z-index;
  position: $position;
}

// PIE elements must have this behavior attached to them.
// IE is broken -- it doesn't think of behavior urls as
// relative to the stylesheet. It considers them relative
// to the webpage. As a result, you cannot reliably use
// compass's relative_assets with PIE.
//
// * `$approach` - one of: relative, z-index, or none
// * `$z-index` - when using the z-index approach, this
//                is the z-index that is applied.
@mixin pie-element(
  $approach: $pie-default-approach,
  $z-index: 0
) {
  behavior: $pie-behavior;
  @if $approach == relative {
    position: relative;
  }
  @else if $approach == z-index {
    z-index: $z-index;
  }
}

// a smart mixin that knows to extend or include pie-element according
// to your stylesheet's configuration variables.
@mixin pie($base-class: $pie-base-class) {
  @if $base-class {
    @extend .#{$base-class};
  }
  @else {
    @include pie-element;
  }
}

// Watch `$n` levels of ancestors for changes to their class attribute
// So that cascading styles will work correctly on the PIE element.
@mixin pie-watch-ancestors($n) {
  -pie-watch-ancestors: $n;
}

// User Interface ------------------------------------------------------------
// This file can be expanded to handle all the user interface properties as
// they become available in browsers:
// http://www.w3.org/TR/2000/WD-css3-userint-20000216
// Usually compass hacks apply to both ie6 & 7 -- set this to false to disable support for both.
$legacy-support-for-ie: true !default;

// Setting this to false will result in smaller output, but no support for ie6 hacks
$legacy-support-for-ie6: $legacy-support-for-ie !default;

// Setting this to false will result in smaller output, but no support for ie7 hacks
$legacy-support-for-ie7: $legacy-support-for-ie !default;

// Setting this to false will result in smaller output, but no support for legacy ie8 hacks
$legacy-support-for-ie8: $legacy-support-for-ie !default;

// @private
// The user can simply set $legacy-support-for-ie and 6, 7, and 8 will be set accordingly,
// But in case the user set each of those explicitly, we need to sync the value of
// this combined variable.
$legacy-support-for-ie: $legacy-support-for-ie6 or $legacy-support-for-ie7 or $legacy-support-for-ie8;

// Whether to output legacy support for mozilla.
// Usually this means hacks to support Firefox 3.6 or earlier.
$legacy-support-for-mozilla: true;

// Support for mozilla in experimental css3 properties (-moz).
$experimental-support-for-mozilla      : true !default;
// Support for webkit in experimental css3 properties (-webkit).
$experimental-support-for-webkit       : true !default;
// Support for webkit's original (non-standard) gradient syntax.
$support-for-original-webkit-gradients : true !default;
// Support for opera in experimental css3 properties (-o).
$experimental-support-for-opera        : true !default;
// Support for microsoft in experimental css3 properties (-ms).
$experimental-support-for-microsoft    : true !default;
// Support for khtml in experimental css3 properties (-khtml).
$experimental-support-for-khtml        : false !default;
// Support for svg in experimental css3 properties.
// Setting this to true might add significant size to your
// generated stylesheets.
$experimental-support-for-svg          : false !default;
// Support for CSS PIE in experimental css3 properties (-pie).
$experimental-support-for-pie          : false !default;

// This mixin provides basic support for CSS3 properties and
// their corresponding experimental CSS2 properties when
// the implementations are identical except for the property
// prefix.
@mixin experimental($property, $value,
  $moz      : $experimental-support-for-mozilla,
  $webkit   : $experimental-support-for-webkit,
  $o        : $experimental-support-for-opera,
  $ms       : $experimental-support-for-microsoft,
  $khtml    : $experimental-support-for-khtml,
  $official : true
) {
  @if $webkit  and $experimental-support-for-webkit    { -webkit-#{$property} : $value; }
  @if $khtml   and $experimental-support-for-khtml     {  -khtml-#{$property} : $value; }
  @if $moz     and $experimental-support-for-mozilla   {    -moz-#{$property} : $value; }
  @if $ms      and $experimental-support-for-microsoft {     -ms-#{$property} : $value; }
  @if $o       and $experimental-support-for-opera     {      -o-#{$property} : $value; }
  @if $official                                        {         #{$property} : $value; }
}

// Same as experimental(), but for cases when the property is the same and the value is vendorized
@mixin experimental-value($property, $value,
  $moz      : $experimental-support-for-mozilla,
  $webkit   : $experimental-support-for-webkit,
  $o        : $experimental-support-for-opera,
  $ms       : $experimental-support-for-microsoft,
  $khtml    : $experimental-support-for-khtml,
  $official : true
) {
  @if $webkit  and $experimental-support-for-webkit    { #{$property} : -webkit-#{$value}; }
  @if $khtml   and $experimental-support-for-khtml     { #{$property} :  -khtml-#{$value}; }
  @if $moz     and $experimental-support-for-mozilla   { #{$property} :    -moz-#{$value}; }
  @if $ms      and $experimental-support-for-microsoft { #{$property} :     -ms-#{$value}; }
  @if $o       and $experimental-support-for-opera     { #{$property} :      -o-#{$value}; }
  @if $official                                        { #{$property} :         #{$value}; }
}

// This property controls the selection model and granularity of an element.
//
// @param $select
//   [ none | text | toggle | element | elements | all | inherit ]
@mixin user-select($select) {
  $select: unquote($select);
  @include experimental(user-select, $select,
    -moz, -webkit, not(-o), -ms, -khtml, official
  );
}

// Style the html5 input placeholder in browsers that support it.
//
// The styles for the input placeholder are passed as mixin content
// and the selector comes from the mixin's context.
//
// For example:
//
//     #{elements-of-type(text-input)} {
//       @include input-placeholder {
//         color: #bfbfbf;
//         font-style: italic;
//       }
//     }
//
// if you want to apply the placeholder styles to all elements supporting
// the `input-placeholder` pseudo class (beware of performance impacts):
//
//     * {
//       @include input-placeholder {
//         color: #bfbfbf;
//         font-style: italic;
//       }
//     }
@mixin input-placeholder {
  &:-ms-input-placeholder { @content; }
  &:-moz-placeholder { @content; }
  &::-moz-placeholder { @content; }
  &::-webkit-input-placeholder { @content; }
}

// Usually compass hacks apply to both ie6 & 7 -- set this to false to disable support for both.
$legacy-support-for-ie: true !default;

// Setting this to false will result in smaller output, but no support for ie6 hacks
$legacy-support-for-ie6: $legacy-support-for-ie !default;

// Setting this to false will result in smaller output, but no support for ie7 hacks
$legacy-support-for-ie7: $legacy-support-for-ie !default;

// Setting this to false will result in smaller output, but no support for legacy ie8 hacks
$legacy-support-for-ie8: $legacy-support-for-ie !default;

// @private
// The user can simply set $legacy-support-for-ie and 6, 7, and 8 will be set accordingly,
// But in case the user set each of those explicitly, we need to sync the value of
// this combined variable.
$legacy-support-for-ie: $legacy-support-for-ie6 or $legacy-support-for-ie7 or $legacy-support-for-ie8;

// Whether to output legacy support for mozilla.
// Usually this means hacks to support Firefox 3.6 or earlier.
$legacy-support-for-mozilla: true;

// Support for mozilla in experimental css3 properties (-moz).
$experimental-support-for-mozilla      : true !default;
// Support for webkit in experimental css3 properties (-webkit).
$experimental-support-for-webkit       : true !default;
// Support for webkit's original (non-standard) gradient syntax.
$support-for-original-webkit-gradients : true !default;
// Support for opera in experimental css3 properties (-o).
$experimental-support-for-opera        : true !default;
// Support for microsoft in experimental css3 properties (-ms).
$experimental-support-for-microsoft    : true !default;
// Support for khtml in experimental css3 properties (-khtml).
$experimental-support-for-khtml        : false !default;
// Support for svg in experimental css3 properties.
// Setting this to true might add significant size to your
// generated stylesheets.
$experimental-support-for-svg          : false !default;
// Support for CSS PIE in experimental css3 properties (-pie).
$experimental-support-for-pie          : false !default;

// Usually compass hacks apply to both ie6 & 7 -- set this to false to disable support for both.
$legacy-support-for-ie: true !default;

// Setting this to false will result in smaller output, but no support for ie6 hacks
$legacy-support-for-ie6: $legacy-support-for-ie !default;

// Setting this to false will result in smaller output, but no support for ie7 hacks
$legacy-support-for-ie7: $legacy-support-for-ie !default;

// Setting this to false will result in smaller output, but no support for legacy ie8 hacks
$legacy-support-for-ie8: $legacy-support-for-ie !default;

// @private
// The user can simply set $legacy-support-for-ie and 6, 7, and 8 will be set accordingly,
// But in case the user set each of those explicitly, we need to sync the value of
// this combined variable.
$legacy-support-for-ie: $legacy-support-for-ie6 or $legacy-support-for-ie7 or $legacy-support-for-ie8;

// Whether to output legacy support for mozilla.
// Usually this means hacks to support Firefox 3.6 or earlier.
$legacy-support-for-mozilla: true;

// Support for mozilla in experimental css3 properties (-moz).
$experimental-support-for-mozilla      : true !default;
// Support for webkit in experimental css3 properties (-webkit).
$experimental-support-for-webkit       : true !default;
// Support for webkit's original (non-standard) gradient syntax.
$support-for-original-webkit-gradients : true !default;
// Support for opera in experimental css3 properties (-o).
$experimental-support-for-opera        : true !default;
// Support for microsoft in experimental css3 properties (-ms).
$experimental-support-for-microsoft    : true !default;
// Support for khtml in experimental css3 properties (-khtml).
$experimental-support-for-khtml        : false !default;
// Support for svg in experimental css3 properties.
// Setting this to true might add significant size to your
// generated stylesheets.
$experimental-support-for-svg          : false !default;
// Support for CSS PIE in experimental css3 properties (-pie).
$experimental-support-for-pie          : false !default;

// This mixin provides basic support for CSS3 properties and
// their corresponding experimental CSS2 properties when
// the implementations are identical except for the property
// prefix.
@mixin experimental($property, $value,
  $moz      : $experimental-support-for-mozilla,
  $webkit   : $experimental-support-for-webkit,
  $o        : $experimental-support-for-opera,
  $ms       : $experimental-support-for-microsoft,
  $khtml    : $experimental-support-for-khtml,
  $official : true
) {
  @if $webkit  and $experimental-support-for-webkit    { -webkit-#{$property} : $value; }
  @if $khtml   and $experimental-support-for-khtml     {  -khtml-#{$property} : $value; }
  @if $moz     and $experimental-support-for-mozilla   {    -moz-#{$property} : $value; }
  @if $ms      and $experimental-support-for-microsoft {     -ms-#{$property} : $value; }
  @if $o       and $experimental-support-for-opera     {      -o-#{$property} : $value; }
  @if $official                                        {         #{$property} : $value; }
}

// Same as experimental(), but for cases when the property is the same and the value is vendorized
@mixin experimental-value($property, $value,
  $moz      : $experimental-support-for-mozilla,
  $webkit   : $experimental-support-for-webkit,
  $o        : $experimental-support-for-opera,
  $ms       : $experimental-support-for-microsoft,
  $khtml    : $experimental-support-for-khtml,
  $official : true
) {
  @if $webkit  and $experimental-support-for-webkit    { #{$property} : -webkit-#{$value}; }
  @if $khtml   and $experimental-support-for-khtml     { #{$property} :  -khtml-#{$value}; }
  @if $moz     and $experimental-support-for-mozilla   { #{$property} :    -moz-#{$value}; }
  @if $ms      and $experimental-support-for-microsoft { #{$property} :     -ms-#{$value}; }
  @if $o       and $experimental-support-for-opera     { #{$property} :      -o-#{$value}; }
  @if $official                                        { #{$property} :         #{$value}; }
}

// This is the underlying implementation for all the other mixins in this module.
// It is the only way to access prefix support for older versions of the spec.
// Deviates from canonical Compass implementation by dropping support for
// older versions of the Flexbox spec.
//
// `$properties`: map of property-value pairs that should be prefixed
@mixin flexbox($properties) {
  @each $prop, $value in $properties {
    @if $prop == display {
      @include experimental-value(display, $value, not(-moz), -webkit,
                                  not(-o), not(-ms), not(-khtml), official);
    } @else {
      @include experimental($prop, $value, not(-moz), -webkit, not(-o),
                            not(-ms), not(-khtml), official);
    }
  }
}

// Values for $display are: flex (default), inline-flex
@mixin display-flex($display: flex) {
  @include flexbox((display: $display));
}

// Values: row | row-reverse | column | column-reverse
@mixin flex-direction($direction) {
  @include flexbox((flex-direction: $direction));
}

// Values: nowrap | wrap | wrap-reverse
@mixin flex-wrap($wrap) {
  @include flexbox((flex-wrap: $wrap));
}

// Shorthand for flex-direction and flex-wrap.
@mixin flex-flow($flow) {
  @include flexbox((flex-flow: $flow));
}

// Accepts an integer
@mixin order($order) {
  @include flexbox((order: $order));
}

// Shorthand for flex-grow, flex-shrink and optionally flex-basis.
// Space separated, in that order.
@mixin flex($flex) {
  @include flexbox((flex: $flex));
}

// Accepts a number.
@mixin flex-grow($flex-grow) {
  @include flexbox((flex-grow: $flex-grow));
}

// Accepts a number.
@mixin flex-shrink($flex-shrink) {
  @include flexbox((flex-shrink: $flex-shrink));
}

// Accepts any legal value for the width property.
@mixin flex-basis($flex-basis) {
  @include flexbox((flex-basis: $flex-basis));
}

// Legal values: flex-start | flex-end | center | space-between | space-around
@mixin justify-content($justify-content) {
  @include flexbox((justify-content: $justify-content));
}

// Legal values: flex-start | flex-end | center | baseline | stretch
@mixin align-items($align-items) {
  @include flexbox((align-items: $align-items));
}

// Legal values: auto | flex-start | flex-end | center | baseline | stretch
@mixin align-self($align-self) {
  @include flexbox((align-self: $align-self));
}

// Legal values: flex-start | flex-end | center | space-between | space-around | stretch
@mixin align-content($align-content) {
  @include flexbox((align-content: $align-content));
}

// Usually compass hacks apply to both ie6 & 7 -- set this to false to disable support for both.
$legacy-support-for-ie: true !default;

// Setting this to false will result in smaller output, but no support for ie6 hacks
$legacy-support-for-ie6: $legacy-support-for-ie !default;

// Setting this to false will result in smaller output, but no support for ie7 hacks
$legacy-support-for-ie7: $legacy-support-for-ie !default;

// Setting this to false will result in smaller output, but no support for legacy ie8 hacks
$legacy-support-for-ie8: $legacy-support-for-ie !default;

// @private
// The user can simply set $legacy-support-for-ie and 6, 7, and 8 will be set accordingly,
// But in case the user set each of those explicitly, we need to sync the value of
// this combined variable.
$legacy-support-for-ie: $legacy-support-for-ie6 or $legacy-support-for-ie7 or $legacy-support-for-ie8;

// Whether to output legacy support for mozilla.
// Usually this means hacks to support Firefox 3.6 or earlier.
$legacy-support-for-mozilla: true;

// Support for mozilla in experimental css3 properties (-moz).
$experimental-support-for-mozilla      : true !default;
// Support for webkit in experimental css3 properties (-webkit).
$experimental-support-for-webkit       : true !default;
// Support for webkit's original (non-standard) gradient syntax.
$support-for-original-webkit-gradients : true !default;
// Support for opera in experimental css3 properties (-o).
$experimental-support-for-opera        : true !default;
// Support for microsoft in experimental css3 properties (-ms).
$experimental-support-for-microsoft    : true !default;
// Support for khtml in experimental css3 properties (-khtml).
$experimental-support-for-khtml        : false !default;
// Support for svg in experimental css3 properties.
// Setting this to true might add significant size to your
// generated stylesheets.
$experimental-support-for-svg          : false !default;
// Support for CSS PIE in experimental css3 properties (-pie).
$experimental-support-for-pie          : false !default;

// This mixin provides basic support for CSS3 properties and
// their corresponding experimental CSS2 properties when
// the implementations are identical except for the property
// prefix.
@mixin experimental($property, $value,
  $moz      : $experimental-support-for-mozilla,
  $webkit   : $experimental-support-for-webkit,
  $o        : $experimental-support-for-opera,
  $ms       : $experimental-support-for-microsoft,
  $khtml    : $experimental-support-for-khtml,
  $official : true
) {
  @if $webkit  and $experimental-support-for-webkit    { -webkit-#{$property} : $value; }
  @if $khtml   and $experimental-support-for-khtml     {  -khtml-#{$property} : $value; }
  @if $moz     and $experimental-support-for-mozilla   {    -moz-#{$property} : $value; }
  @if $ms      and $experimental-support-for-microsoft {     -ms-#{$property} : $value; }
  @if $o       and $experimental-support-for-opera     {      -o-#{$property} : $value; }
  @if $official                                        {         #{$property} : $value; }
}

// Same as experimental(), but for cases when the property is the same and the value is vendorized
@mixin experimental-value($property, $value,
  $moz      : $experimental-support-for-mozilla,
  $webkit   : $experimental-support-for-webkit,
  $o        : $experimental-support-for-opera,
  $ms       : $experimental-support-for-microsoft,
  $khtml    : $experimental-support-for-khtml,
  $official : true
) {
  @if $webkit  and $experimental-support-for-webkit    { #{$property} : -webkit-#{$value}; }
  @if $khtml   and $experimental-support-for-khtml     { #{$property} :  -khtml-#{$value}; }
  @if $moz     and $experimental-support-for-mozilla   { #{$property} :    -moz-#{$value}; }
  @if $ms      and $experimental-support-for-microsoft { #{$property} :     -ms-#{$value}; }
  @if $o       and $experimental-support-for-opera     { #{$property} :      -o-#{$value}; }
  @if $official                                        { #{$property} :         #{$value}; }
}

// Usually compass hacks apply to both ie6 & 7 -- set this to false to disable support for both.
$legacy-support-for-ie: true !default;

// Setting this to false will result in smaller output, but no support for ie6 hacks
$legacy-support-for-ie6: $legacy-support-for-ie !default;

// Setting this to false will result in smaller output, but no support for ie7 hacks
$legacy-support-for-ie7: $legacy-support-for-ie !default;

// Setting this to false will result in smaller output, but no support for legacy ie8 hacks
$legacy-support-for-ie8: $legacy-support-for-ie !default;

// @private
// The user can simply set $legacy-support-for-ie and 6, 7, and 8 will be set accordingly,
// But in case the user set each of those explicitly, we need to sync the value of
// this combined variable.
$legacy-support-for-ie: $legacy-support-for-ie6 or $legacy-support-for-ie7 or $legacy-support-for-ie8;

// Whether to output legacy support for mozilla.
// Usually this means hacks to support Firefox 3.6 or earlier.
$legacy-support-for-mozilla: true;

// Support for mozilla in experimental css3 properties (-moz).
$experimental-support-for-mozilla      : true !default;
// Support for webkit in experimental css3 properties (-webkit).
$experimental-support-for-webkit       : true !default;
// Support for webkit's original (non-standard) gradient syntax.
$support-for-original-webkit-gradients : true !default;
// Support for opera in experimental css3 properties (-o).
$experimental-support-for-opera        : true !default;
// Support for microsoft in experimental css3 properties (-ms).
$experimental-support-for-microsoft    : true !default;
// Support for khtml in experimental css3 properties (-khtml).
$experimental-support-for-khtml        : false !default;
// Support for svg in experimental css3 properties.
// Setting this to true might add significant size to your
// generated stylesheets.
$experimental-support-for-svg          : false !default;
// Support for CSS PIE in experimental css3 properties (-pie).
$experimental-support-for-pie          : false !default;

// The `zoom` approach generates less CSS but does not validate.
// Set this to `block` to use the display-property to hack the
// element to gain layout.
$default-has-layout-approach: zoom !default;

// This mixin causes an element matching the selector
// to gain the "hasLayout" property in internet explorer.
// More information on [hasLayout](http://reference.sitepoint.com/css/haslayout).
@mixin has-layout($approach: $default-has-layout-approach) {
  @if $legacy-support-for-ie {
    @if $approach == zoom {
      @include has-layout-zoom;
    } @else if $approach == block {
      @include has-layout-block;
    } @else {
      @warn "Unknown has-layout approach: #{$approach}";
      @include has-layout-zoom;
    }
  }
}

@mixin has-layout-zoom {
  @if $legacy-support-for-ie6 or $legacy-support-for-ie7 {
    *zoom: 1;
  }
}

@mixin has-layout-block {
  @if $legacy-support-for-ie {
    // This makes ie6 get layout
    display: inline-block;
    // and this puts it back to block
    & { display: block; }
  }
}

// A hack to supply IE6 (and below) with a different property value.
// [Read more](http://www.cssportal.com/css-hacks/#in_css-important).
@mixin bang-hack($property, $value, $ie6-value) {
  @if $legacy-support-for-ie6 {
    #{$property}: #{$value} !important;
    #{$property}: #{$ie6-value};
  }
}

//
// A partial implementation of the Ruby list functions from Compass:
// https://github.com/Compass/compass/blob/stable/lib/compass/sass_extensions/functions/lists.rb
//


// compact is part of libsass

@function -compass-nth($list, $place) {
  // Yep, Sass-lists are 1-indexed.
  @if $place == "first" {
    $place: 1;
  }
  @if $place == "last" {
    $place: length($list);
  }
  @return nth($list, $place);
}

// compass_list can't be implemented in sass script

@function -compass-space-list($item1, $item2:null, $item3:null, $item4:null, $item5:null, $item6:null, $item7:null, $item8:null, $item9:null) {
  $items: ();
  // Support for polymorphism.
  @if type-of($item1) == 'list' {
    // Passing a single array of properties.
    $items: $item1;
  } @else {
    $items: $item1 $item2 $item3 $item4 $item5 $item6 $item7 $item8 $item9;
  }

  $full: first-value-of($items);

  @for $i from 2 through length($items) {
    $item: nth($items, $i);
    @if $item != null {
      $full: $full $item;
    }
  }

  @return $full;
}

@function -compass-list-size($list) {
  @return length($list);
}

@function -compass-slice($list, $start, $end: false) {
  @if $end == false {
    $end: length($list);
  }
  $full: nth($list, $start);
  @for $i from $start + 1 through $end {
    $full: $full, nth($list, $i);
  }
  @return $full;
}

@function reject($list, $reject1, $reject2:null, $reject3:null, $reject4:null, $reject5:null, $reject6:null, $reject7:null, $reject8:null, $reject9:null) {
  $rejects: $reject1, $reject2, $reject3, $reject4, $reject5, $reject6, $reject7, $reject8, $reject9;

  $full: false;
  @each $item in $list {
    @if index($rejects, $item) {}
    @else {
      @if $full {
        $full: $full, $item;
      }
      @else {
        $full: $item;
      }
    }
  }
  @return $full;
}

@function first-value-of($list) {
  @return nth($list, 1);
}

@function compact($vars...) {
  $separator: list-separator($vars);
  $list: ();
  @each $var in $vars {
      @if $var {
          $list: append($list, $var, $separator);
      }
  }
  @return $list;
}

// 
// A partial implementation of the Ruby cross browser support functions from Compass:
// https://github.com/Compass/compass/blob/stable/lib/compass/sass_extensions/functions/cross_browser_support.rb
// 

@function prefixed($prefix, $property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
  $properties: $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9;
  $prefixed: false;
  @each $item in $properties {
    @if type-of($item) == 'string' {
      $prefixed: $prefixed or str-index($item, 'url') != 1 and str-index($item, 'rgb') != 1 and str-index($item, '#') != 1;
    } @elseif type-of($item) == 'color' {
    } @elseif $item != null {
      $prefixed: true;
    }
  }
  @return $prefixed;
}

@function prefix($prefix, $property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
  $properties: "";

  // Support for polymorphism.
  @if type-of($property1) == 'list' {
    // Passing a single array of properties.
    $properties: $property1;
  } @else {
    // Passing multiple properties.
    $properties: $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9;
  }

  $props: false;
  @each $item in $properties {
    @if $item == null {}
    @else {
      @if prefixed($prefix, $item) {
        $item: #{$prefix}-#{$item};
      }
      @if $props {
        $props: $props, $item;
      }
      @else {
        $props: $item;
      }
    }
  }
  @return $props;
}

@function -svg($property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
  @return prefix('-svg', $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9);
}

@function -owg($property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
  @return prefix('-owg', $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9);
}

@function -webkit($property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
  @return prefix('-webkit', $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9);
}

@function -moz($property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
  @return prefix('-moz', $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9);
}

@function -o($property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
  @return prefix('-o', $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9);
}

@function -pie($property1, $property2:null, $property3:null, $property4:null, $property5:null, $property6:null, $property7:null, $property8:null, $property9:null) {
  @return prefix('-pie', $property1, $property2, $property3, $property4, $property5, $property6, $property7, $property8, $property9);
}

// 
// A partial implementation of the Ruby gradient support functions from Compass:
// https://github.com/Compass/compass/blob/v0.12.2/lib/compass/sass_extensions/functions/gradient_support.rb
// 

@function color-stops($item1, $item2:null, $item3:null, $item4:null, $item5:null, $item6:null, $item7:null, $item8:null, $item9:null) {
  $items: $item2, $item3, $item4, $item5, $item6, $item7, $item8, $item9;
  $full: $item1;
  @each $item in $items {
    @if $item != null {
      $full: $full, $item;
    }    
  }
  @return $full;
}
// 
// A partial implementation of the Ruby constants functions from Compass:
// https://github.com/Compass/compass/blob/stable/lib/compass/sass_extensions/functions/constants.rb
// 

@function opposite-position($from) {
    @if ($from == top) {
        @return bottom;
    } @else if ($from == bottom) {
        @return top;
    } @else if ($from == left) {
        @return right;
    } @else if ($from == right) {
        @return left;
    } @else if ($from == center) {
        @return center;
    }
}

// 
// A partial implementation of the Ruby display functions from Compass:
// https://github.com/Compass/compass/blob/stable/core/lib/compass/core/sass_extensions/functions/display.rb
// 

@function elements-of-type($type){
    @if ($type == block){
        @return address, article, aside, blockquote, center, dir, div, dd, details, dl, dt, fieldset, figcaption, figure, form, footer, frameset, h1, h2, h3, h4, h5, h6, hr, header, hgroup, isindex, main, menu, nav, noframes, noscript, ol, p, pre, section, summary, ul;
    } @else if ($type == inline){
        @return a, abbr, acronym, audio, b, basefont, bdo, big, br, canvas, cite, code, command, datalist, dfn, em, embed, font, i, img, input, keygen, kbd, label, mark, meter, output, progress, q, rp, rt, ruby, s, samp, select, small, span, strike, strong, sub, sup, textarea, time, tt, u, var, video, wbr;
    } @else if ($type == inline-block){
        @return img;
    } @else if ($type == table){
        @return table;
    } @else if ($type == list-item){
        @return li;
    } @else if ($type == table-row-group){
        @return tbody;
    } @else if ($type == table-header-group){
        @return thead;
    } @else if ($type == table-footer-group){
        @return tfoot;
    } @else if ($type == table-row){
        @return tr;
    } @else if ($type == table-cell){
        @return th, td;
    } @else if ($type == html5-block){
        @return article, aside, details, figcaption, figure, footer, header, hgroup, main, menu, nav, section, summary;
    } @else if ($type == html5-inline){
        @return audio, canvas, command, datalist, embed, keygen, mark, meter, output, progress, rp, rt, ruby, time, video, wbr;
    } @else if ($type == html5){
        @return article, aside, audio, canvas, command, datalist, details, embed, figcaption, figure, footer, header, hgroup, keygen, main, mark, menu, meter, nav, output, progress, rp, rt, ruby, section, summary, time, video, wbr;
    } @else if ($type == text-input){
        @return input, textarea;
    }
}

// 
// A partial implementation of the Ruby colors functions from Compass:
// https://github.com/Compass/compass/blob/stable/core/lib/compass/core/sass_extensions/functions/colors.rb
//

// a genericized version of lighten/darken so that negative values can be used.
@function adjust-lightness($color, $amount) {
    @return adjust-color($color, $lightness: $amount);
}

// Scales a color's lightness by some percentage.
// If the amount is negative, the color is scaled darker, if positive, it is scaled lighter.
// This will never return a pure light or dark color unless the amount is 100%.
@function scale-lightness($color, $amount) {
    @return scale-color($color, $lightness: $amount);
}

// a genericized version of saturate/desaturate so that negative values can be used.
@function adjust-saturation($color, $amount) {
    @return adjust-color($color, $saturation: $amount);
}

// Scales a color's saturation by some percentage.
// If the amount is negative, the color is desaturated, if positive, it is saturated.
// This will never return a pure saturated or desaturated color unless the amount is 100%.
@function scale-saturation($color, $amount) {
    @return scale-color($color, $saturation: $amount);
}

@function shade($color, $percentage) {
    @return mix(#000000, $color, $percentage);
}

@function tint($color, $percentage) {
    @return mix(#ffffff, $color, $percentage);
}


// Background property support for vendor prefixing within values.
@mixin background(
  $background-1,
  $background-2: false,
  $background-3: false,
  $background-4: false,
  $background-5: false,
  $background-6: false,
  $background-7: false,
  $background-8: false,
  $background-9: false,
  $background-10: false
) {
  $backgrounds: compact($background-1, $background-2, $background-3, $background-4, $background-5,
                        $background-6, $background-7, $background-8, $background-9, $background-10);
  $mult-bgs: -compass-list-size($backgrounds) > 1;
  $add-pie-bg: prefixed(-pie,   $backgrounds) or $mult-bgs;
  @if $experimental-support-for-svg          and prefixed(-svg,    $backgrounds) {      background:    -svg($backgrounds); }
  @if $support-for-original-webkit-gradients and prefixed(-owg,    $backgrounds) {      background:    -owg($backgrounds); }
  @if $experimental-support-for-webkit       and prefixed(-webkit, $backgrounds) {      background: -webkit($backgrounds); }
  @if $experimental-support-for-mozilla      and prefixed(-moz,    $backgrounds) {      background:    -moz($backgrounds); }
  @if $experimental-support-for-opera        and prefixed(-o,      $backgrounds) {      background:      -o($backgrounds); }
  @if $experimental-support-for-pie          and $add-pie-bg                     { -pie-background:    -pie($backgrounds); }
                                                                                        background:         $backgrounds ;
}

@mixin background-with-css2-fallback(
  $background-1,
  $background-2: false,
  $background-3: false,
  $background-4: false,
  $background-5: false,
  $background-6: false,
  $background-7: false,
  $background-8: false,
  $background-9: false,
  $background-10: false
) {
  $backgrounds: compact($background-1, $background-2, $background-3, $background-4, $background-5,
                        $background-6, $background-7, $background-8, $background-9, $background-10);
  $mult-bgs: -compass-list-size($backgrounds) > 1;
  $simple-background: if($mult-bgs or prefixed(-css2, $backgrounds), -css2(-compass-nth($backgrounds, last)), false);
  @if not(blank($simple-background)) { background: $simple-background; }
  @include background($background-1, $background-2, $background-3, $background-4, $background-5,
                      $background-6, $background-7, $background-8, $background-9, $background-10);
}


// Background image property support for vendor prefixing within values.
@mixin background-image(
  $image-1,
  $image-2: false,
  $image-3: false,
  $image-4: false,
  $image-5: false,
  $image-6: false,
  $image-7: false,
  $image-8: false,
  $image-9: false,
  $image-10: false
) {
  $images: compact($image-1, $image-2, $image-3, $image-4, $image-5, $image-6, $image-7, $image-8, $image-9, $image-10);
  $add-pie-bg: prefixed(-pie,   $images) or -compass-list-size($images) > 1;

  @if $experimental-support-for-svg          and prefixed(-svg,    $images) { background-image:    -svg($images); background-size: 100%; }
  @if $support-for-original-webkit-gradients and prefixed(-owg,    $images) { background-image:    -owg($images); }
  @if $experimental-support-for-webkit       and prefixed(-webkit, $images) { background-image: -webkit($images); }
  @if $experimental-support-for-mozilla      and prefixed(-moz,    $images) { background-image:    -moz($images); }
  @if $experimental-support-for-opera        and prefixed(-o,      $images) { background-image:      -o($images); }
  @if $experimental-support-for-pie          and $add-pie-bg                { @warn "PIE does not support background-image. Use @include background(#{$images}) instead." }
                                                                              background-image:         $images ;
}

// Emit a IE-Specific filters that renders a simple linear gradient.
// For use in IE 6 - 8. Best practice would have you apply this via a
// conditional IE stylesheet, but if you must, you should place this before
// any background-image properties that you have specified.
//
// For the `$orientation` parameter, you can pass `vertical` or `horizontal`.
@mixin filter-gradient($start-color, $end-color, $orientation: vertical) {
  @include has-layout;
  $gradient-type: if($orientation == vertical, 0, 1);
  @if $legacy-support-for-ie6 or $legacy-support-for-ie7 or $legacy-support-for-ie8 {
    filter: progid:DXImageTransform.Microsoft.gradient(gradientType=#{$gradient-type}, startColorstr='#{ie-hex-str($start-color)}', endColorstr='#{ie-hex-str($end-color)}');
  }
}


// Border image property support for vendor prefixing properties and values.
@mixin border-image($value) {
  @if $experimental-support-for-mozilla      {    -moz-border-image:    -moz(reject(-compass-list($value), fill)); }
  @if $support-for-original-webkit-gradients { -webkit-border-image:    -owg(reject(-compass-list($value), fill)); }
  @if $experimental-support-for-webkit       { -webkit-border-image: -webkit(reject(-compass-list($value), fill)); }
  @if $experimental-support-for-opera        {      -o-border-image:      -o(reject(-compass-list($value), fill)); }
  @if $experimental-support-for-svg          {         border-image:    -svg(reject(-compass-list($value), fill)); }
                                                       border-image:                              $value;
}

// List style image property support for vendor prefixing within values.
@mixin list-style-image($image) {
  @if $experimental-support-for-mozilla      and prefixed(-moz,    $image) { list-style-image:    -moz($image); }
  @if $support-for-original-webkit-gradients and prefixed(-owg,    $image) { list-style-image:    -owg($image); }
  @if $experimental-support-for-webkit       and prefixed(-webkit, $image) { list-style-image: -webkit($image); }
  @if $experimental-support-for-opera        and prefixed(-o,      $image) { list-style-image:      -o($image); }
  @if $experimental-support-for-svg          and prefixed(-svg,    $image) { list-style-image:    -svg($image); }
                                                                             list-style-image:         $image ;
}

// List style property support for vendor prefixing within values.
@mixin list-style($value) {
  $value: -compass-list($value);
  @if $experimental-support-for-mozilla      and prefixed(-moz,    $value) { list-style-image:    -moz($value); }
  @if $support-for-original-webkit-gradients and prefixed(-owg,    $value) { list-style-image:    -owg($value); }
  @if $experimental-support-for-webkit       and prefixed(-webkit, $value) { list-style-image: -webkit($value); }
  @if $experimental-support-for-opera        and prefixed(-o,      $value) { list-style-image:      -o($value); }
  @if $experimental-support-for-svg          and prefixed(-svg,    $value) { list-style-image:    -svg($value); }
                                                                             list-style-image:         $value ;
}

// content property support for vendor prefixing within values.
@mixin content($value) {
  $value: -compass-list($value);
  @if $experimental-support-for-mozilla      and prefixed(-moz,    $value) { content:    -moz($value); }
  @if $support-for-original-webkit-gradients and prefixed(-owg,    $value) { content:    -owg($value); }
  @if $experimental-support-for-webkit       and prefixed(-webkit, $value) { content: -webkit($value); }
  @if $experimental-support-for-opera        and prefixed(-o,      $value) { content:      -o($value); }
  @if $experimental-support-for-svg          and prefixed(-svg,    $value) { content:    -svg($value); }
                                                                             content:         $value ;
}

// Usually compass hacks apply to both ie6 & 7 -- set this to false to disable support for both.
$legacy-support-for-ie: true !default;

// Setting this to false will result in smaller output, but no support for ie6 hacks
$legacy-support-for-ie6: $legacy-support-for-ie !default;

// Setting this to false will result in smaller output, but no support for ie7 hacks
$legacy-support-for-ie7: $legacy-support-for-ie !default;

// Setting this to false will result in smaller output, but no support for legacy ie8 hacks
$legacy-support-for-ie8: $legacy-support-for-ie !default;

// @private
// The user can simply set $legacy-support-for-ie and 6, 7, and 8 will be set accordingly,
// But in case the user set each of those explicitly, we need to sync the value of
// this combined variable.
$legacy-support-for-ie: $legacy-support-for-ie6 or $legacy-support-for-ie7 or $legacy-support-for-ie8;

// Whether to output legacy support for mozilla.
// Usually this means hacks to support Firefox 3.6 or earlier.
$legacy-support-for-mozilla: true;

// Support for mozilla in experimental css3 properties (-moz).
$experimental-support-for-mozilla      : true !default;
// Support for webkit in experimental css3 properties (-webkit).
$experimental-support-for-webkit       : true !default;
// Support for webkit's original (non-standard) gradient syntax.
$support-for-original-webkit-gradients : true !default;
// Support for opera in experimental css3 properties (-o).
$experimental-support-for-opera        : true !default;
// Support for microsoft in experimental css3 properties (-ms).
$experimental-support-for-microsoft    : true !default;
// Support for khtml in experimental css3 properties (-khtml).
$experimental-support-for-khtml        : false !default;
// Support for svg in experimental css3 properties.
// Setting this to true might add significant size to your
// generated stylesheets.
$experimental-support-for-svg          : false !default;
// Support for CSS PIE in experimental css3 properties (-pie).
$experimental-support-for-pie          : false !default;

// This mixin provides basic support for CSS3 properties and
// their corresponding experimental CSS2 properties when
// the implementations are identical except for the property
// prefix.
@mixin experimental($property, $value,
  $moz      : $experimental-support-for-mozilla,
  $webkit   : $experimental-support-for-webkit,
  $o        : $experimental-support-for-opera,
  $ms       : $experimental-support-for-microsoft,
  $khtml    : $experimental-support-for-khtml,
  $official : true
) {
  @if $webkit  and $experimental-support-for-webkit    { -webkit-#{$property} : $value; }
  @if $khtml   and $experimental-support-for-khtml     {  -khtml-#{$property} : $value; }
  @if $moz     and $experimental-support-for-mozilla   {    -moz-#{$property} : $value; }
  @if $ms      and $experimental-support-for-microsoft {     -ms-#{$property} : $value; }
  @if $o       and $experimental-support-for-opera     {      -o-#{$property} : $value; }
  @if $official                                        {         #{$property} : $value; }
}

// Same as experimental(), but for cases when the property is the same and the value is vendorized
@mixin experimental-value($property, $value,
  $moz      : $experimental-support-for-mozilla,
  $webkit   : $experimental-support-for-webkit,
  $o        : $experimental-support-for-opera,
  $ms       : $experimental-support-for-microsoft,
  $khtml    : $experimental-support-for-khtml,
  $official : true
) {
  @if $webkit  and $experimental-support-for-webkit    { #{$property} : -webkit-#{$value}; }
  @if $khtml   and $experimental-support-for-khtml     { #{$property} :  -khtml-#{$value}; }
  @if $moz     and $experimental-support-for-mozilla   { #{$property} :    -moz-#{$value}; }
  @if $ms      and $experimental-support-for-microsoft { #{$property} :     -ms-#{$value}; }
  @if $o       and $experimental-support-for-opera     { #{$property} :      -o-#{$value}; }
  @if $official                                        { #{$property} :         #{$value}; }
}

//  override to change the default
$default-background-size: 100% auto !default;

// Set the size of background images using px, width and height, or percentages.
// Currently supported in: Opera, Gecko, Webkit.
//
// * percentages are relative to the background-origin (default = padding-box)
// * mixin defaults to: `$default-background-size`
@mixin background-size(
  $size-1: $default-background-size,
  $size-2: false,
  $size-3: false,
  $size-4: false,
  $size-5: false,
  $size-6: false,
  $size-7: false,
  $size-8: false,
  $size-9: false,
  $size-10: false
) {
  $size-1: if(type-of($size-1) == string, unquote($size-1), $size-1);
  $sizes: compact($size-1, $size-2, $size-3, $size-4, $size-5, $size-6, $size-7, $size-8, $size-9, $size-10);
  @include experimental(background-size, $sizes, -moz, -webkit, -o, not(-ms), not(-khtml));
}

// Set the color of your columns
$grid-background-column-color     : rgba(100, 100, 225, 0.25)   !default;
// Set the color of your gutters
$grid-background-gutter-color     : rgba(0, 0, 0, 0)            !default;

// Set the total number of columns in your grid
$grid-background-total-columns    : 24                          !default;
// Set the width of your columns
$grid-background-column-width     : 30px                        !default;
// Set the width of your gutters
$grid-background-gutter-width     : 10px                        !default;
// Set the offset, if your columns are padded in from the container edge
$grid-background-offset           : 0px                         !default;

// Set the color of your baseline
$grid-background-baseline-color   : rgba(0, 0, 0, 0.5)          !default;
// Set the height of your baseline grid
$grid-background-baseline-height  : 1.5em                       !default;

// toggle your columns grids on and off
$show-column-grid-backgrounds     : true                        !default;
// toggle your vertical grids on and off
$show-baseline-grid-backgrounds   : true                        !default;
// toggle all your grids on and off
$show-grid-backgrounds            : true                        !default;

// optionally force your grid-image to remain fluid
// no matter what units you used to declared your grid.
$grid-background-force-fluid      : false                       !default;


// Create the gradient needed for baseline grids
@function get-baseline-gradient(
  $color : $grid-background-baseline-color
) {
  $gradient: linear-gradient(bottom, $color 5%, rgba($color,0) 5%);
  @return $gradient;
}

// Create the color-stops needed for horizontal grids
@function build-grid-background(
  $total          : $grid-background-total-columns,
  $column         : $grid-background-column-width,
  $gutter         : $grid-background-gutter-width,
  $offset         : $grid-background-offset,
  $column-color   : $grid-background-column-color,
  $gutter-color   : $grid-background-gutter-color
) {
  $grid: compact();
  $grid: append($grid, $gutter-color $offset, comma);
  @for $i from 0 to $total {

    // $a represents the start of this column, initially equal to the offset
    $a: $offset;
    @if $i > 0 { $a: $a + (($column + $gutter) * $i); }

    // $g represents the start of this gutter, equal to $a plus one column-width
    $g: $a + $column;

    // $z represents the end of a gutter, equal to $g plus one gutter-width
    $z: $g + $gutter;

    @if (unit($a) == "%") and ($i == ($total - 1)) {
      $z: 100%;
    }

    // and we add this column/gutter pair to our grid
    $grid: join($grid, ($column-color $a, $column-color $g, $gutter-color $g, $gutter-color $z));
  }

  @return $grid;
}

// Return the gradient needed for horizontal grids
@function get-column-gradient(
  $total          : $grid-background-total-columns,
  $column         : $grid-background-column-width,
  $gutter         : $grid-background-gutter-width,
  $offset         : $grid-background-offset,
  $column-color   : $grid-background-column-color,
  $gutter-color   : $grid-background-gutter-color,
  $force-fluid    : $grid-background-force-fluid
) {
  $grid: unquote("");

  // don't force fluid grids when they are already fluid.
  @if unit($column) == "%" { $force-fluid: false; }

  @if $force-fluid {
    $grid: get-column-fluid-grid($total,$column,$gutter,$offset,$column-color,$gutter-color);
  } @else {
    $grid: build-grid-background($total,$column,$gutter,$offset,$column-color,$gutter-color);
  }

  // return the horizontal grid as a gradient
  $gradient: linear-gradient(left, $grid);
  @return $gradient;
}

// Convert a grid from fixed units into percentages.
@function get-column-fluid-grid(
  $total          : $grid-background-total-columns,
  $column         : $grid-background-column-width,
  $gutter         : $grid-background-gutter-width,
  $offset         : $grid-background-offset,
  $column-color   : $grid-background-column-color,
  $gutter-color   : $grid-background-gutter-color
) {
  $context: ($column * $total) + ($gutter * ($total - 1) + ($offset * 2));
  $offset: $offset / $context * 100%;
  $column: $column / $context * 100%;
  $gutter: $gutter / $context * 100%;

  // return the horizontal grid as a set of color-stops
  $grid: build-grid-background($total,$column,$gutter,$offset,$column-color,$gutter-color);
  @return $grid;
}


// Add just the baseline grid to an element's background
@mixin baseline-grid-background(
  $baseline : $grid-background-baseline-height,
  $color    : $grid-background-baseline-color
) {
  @if $show-grid-backgrounds and $show-baseline-grid-backgrounds {
    @include background-image(get-baseline-gradient($color));
    @include background-size(100% $baseline);
    background-position: left top;
  }
}

// Add just the horizontal grid to an element's background
@mixin column-grid-background(
  $total          : $grid-background-total-columns,
  $column         : $grid-background-column-width,
  $gutter         : $grid-background-gutter-width,
  $offset         : $grid-background-offset,
  $column-color   : $grid-background-column-color,
  $gutter-color   : $grid-background-gutter-color,
  $force-fluid    : $grid-background-force-fluid
) {
  @if $show-grid-backgrounds and $show-column-grid-backgrounds {
    @include background-image(
      get-column-gradient($total,$column,$gutter,$offset,$column-color,$gutter-color, $force-fluid)
    );
    background-position: left top;
  }
}

// Add both horizontal and baseline grids to an element's background
@mixin grid-background(
  $total          : $grid-background-total-columns,
  $column         : $grid-background-column-width,
  $gutter         : $grid-background-gutter-width,
  $baseline       : $grid-background-baseline-height,
  $offset         : $grid-background-offset,
  $column-color   : $grid-background-column-color,
  $gutter-color   : $grid-background-gutter-color,
  $baseline-color : $grid-background-baseline-color,
  $force-fluid    : $grid-background-force-fluid
) {
  @if $show-grid-backgrounds {
    @if $show-baseline-grid-backgrounds and $show-column-grid-backgrounds {
      @include background-image(
        get-baseline-gradient($baseline-color),
        get-column-gradient($total,$column,$gutter,$offset,$column-color,$gutter-color, $force-fluid)
      );
      @include background-size(100% $baseline, auto);
      background-position: left top;
    } @else {
      @include baseline-grid-background($baseline, $baseline-color);
      @include column-grid-background($total,$column,$gutter,$offset,$column-color,$gutter-color, $force-fluid);
    }
  }
}

// Based on a [blog post by Ryan Fait](http://ryanfait.com/resources/footer-stick-to-bottom-of-page/).
//
// Must be mixed into the top level of your stylesheet.
//
// Footer element must be outside of root wrapper element.
//
// Footer must be a fixed height.

@mixin sticky-footer($footer-height, $root-selector: unquote("#root"), $root-footer-selector: unquote("#root_footer"), $footer-selector: unquote("#footer")) {
  html, body {
    height: 100%; }
  #{$root-selector} {
    clear: both;
    min-height: 100%;
    height: auto !important;
    height: 100%;
    margin-bottom: -$footer-height;
    #{$root-footer-selector} {
      height: $footer-height; } }
  #{$footer-selector} {
    clear: both;
    position: relative;
    height: $footer-height; } }


// stretch element height to specified top and bottom position

@mixin stretch-y($offset-top:0, $offset-bottom:0) {
  @include stretch($offset-top, false, $offset-bottom, false);
}


// stretch element width to specified left and right position

@mixin stretch-x($offset-left:0, $offset-right:0) {
  @include stretch(false, $offset-right, false, $offset-left);
}


// shorthand to stretch element height and width

@mixin stretch($offset-top:0, $offset-right:0, $offset-bottom:0, $offset-left:0) {
  position: absolute;
  @if $offset-top { top: $offset-top; }
  @if $offset-bottom { bottom: $offset-bottom; }
  @if $offset-left { left: $offset-left; }
  @if $offset-right { right: $offset-right; }
}
@mixin set-experimental-support($moz: false, $webkit: false, $ms: false, $o: false, $khtml: false) {
  $experimental-support-for-mozilla: $moz;
  $experimental-support-for-webkit: $webkit;
  $experimental-support-for-microsoft: $ms;
  $experimental-support-for-opera: $o;
  $experimental-support-for-khtml: $khtml;
}

@mixin with-only-support-for($moz: false, $webkit: false, $ms: false, $o: false, $khtml: false) {
  // Capture the current state
  $original-moz: $experimental-support-for-mozilla;
  $original-webkit: $experimental-support-for-webkit;
  $original-o: $experimental-support-for-opera;
  $original-ms: $experimental-support-for-microsoft;
  $original-khtml: $experimental-support-for-khtml;

  @include set-experimental-support($moz, $webkit, $ms, $o, $khtml);

  @content;

  @include set-experimental-support($original-moz, $original-webkit, $original-ms, $original-o, $original-khtml);
}
// CSS Animations.

// Apply an animation property and value with the correct browser support
@mixin animation-support($property, $value) {
  @include experimental($property, $value, -moz, -webkit, -o, -ms, not -khtml, official); }

// Name of any animation as a string.
$default-animation-name             : false !default;

// Duration of the entire animation in seconds.
$default-animation-duration         : false !default;

// Delay for start of animation in seconds.
$default-animation-delay            : false !default;

// The timing function(s) to be used between keyframes. [ease | linear | ease-in | ease-out | ease-in-out | cubic-bezier($number, $number, $number, $number)]
$default-animation-timing-function  : false !default;

// The number of times an animation cycle is played. [infinite | $number]
$default-animation-iteration-count  : false !default;

// Whether or not the animation should play in reverse on alternate cycles. [normal | alternate]
$default-animation-direction        : false !default;

// What values are applied by the animation outside the time it is executing. [none | forwards | backwards | both]
$default-animation-fill-mode        : false !default;

// Whether the animation is running or paused. [running | paused]
$default-animation-play-state       : false !default;

// Create a named animation sequence that can be applied to elements later.
//
//     $name    - The name of your animation.
//     @content - The keyframes of the animation.
@mixin keyframes(
  $name,
  $moz: $experimental-support-for-mozilla,
  $webkit: $experimental-support-for-webkit,
  $o: $experimental-support-for-opera,
  $ms: $experimental-support-for-microsoft,
  $khtml: $experimental-support-for-khtml,
  $official: true
) {
  @if $moz {
    @include with-only-support-for($moz: true) {
      @-moz-keyframes #{$name} { @content; }
    }
  }
  @if $webkit {
    @include with-only-support-for($webkit: true) {
      @-webkit-keyframes #{$name} { @content; }
    }
  }
  @if $o {
    @include with-only-support-for($o: true) {
      @-o-keyframes #{$name} { @content; }
    }
  }
  @if $ms {
    @include with-only-support-for($ms: true) {
      @-ms-keyframes #{$name} { @content; }
    }
  }
  @if $khtml {
    @include with-only-support-for($khtml: true) {
      @-khtml-keyframes #{$name} { @content; }
    }
  }
  @if $official {
    @include with-only-support-for {
      @keyframes #{$name} { @content; }
    }
  }
}

// Apply 1-10 animation names.
@mixin animation-name($name-1: $default-animation-name, $name-2: false, $name-3: false, $name-4: false, $name-5: false, $name-6: false, $name-7: false, $name-8: false, $name-9: false, $name-10: false) {
  $name: compact($name-1, $name-2, $name-3, $name-4, $name-5, $name-6, $name-7, $name-8, $name-9, $name-10);
  @include animation-support(animation-name, $name); }

// Apply 1-10 animation durations.
@mixin animation-duration($duration-1: $default-animation-duration, $duration-2: false, $duration-3: false, $duration-4: false, $duration-5: false, $duration-6: false, $duration-7: false, $duration-8: false, $duration-9: false, $duration-10: false) {
  $duration: compact($duration-1, $duration-2, $duration-3, $duration-4, $duration-5, $duration-6, $duration-7, $duration-8, $duration-9, $duration-10);
  @include animation-support(animation-duration, $duration); }

// Apply 1-10 animation delays.
@mixin animation-delay($delay-1: $default-animation-delay, $delay-2: false, $delay-3: false, $delay-4: false, $delay-5: false, $delay-6: false, $delay-7: false, $delay-8: false, $delay-9: false, $delay-10: false) {
  $delay: compact($delay-1, $delay-2, $delay-3, $delay-4, $delay-5, $delay-6, $delay-7, $delay-8, $delay-9, $delay-10);
  @include animation-support(animation-delay, $delay); }

// Apply 1-10 animation timing functions.
@mixin animation-timing-function($function-1: $default-animation-timing-function, $function-2: false, $function-3: false, $function-4: false, $function-5: false, $function-6: false, $function-7: false, $function-8: false, $function-9: false, $function-10: false) {
  $function: compact($function-1, $function-2, $function-3, $function-4, $function-5, $function-6, $function-7, $function-8, $function-9, $function-10);
  @include animation-support(animation-timing-function, $function); }

// Apply 1-10 animation iteration counts.
@mixin animation-iteration-count($count-1: $default-animation-iteration-count, $count-2: false, $count-3: false, $count-4: false, $count-5: false, $count-6: false, $count-7: false, $count-8: false, $count-9: false, $count-10: false) {
  $count: compact($count-1, $count-2, $count-3, $count-4, $count-5, $count-6, $count-7, $count-8, $count-9, $count-10);
  @include animation-support(animation-iteration-count, $count); }

// Apply 1-10 animation directions.
@mixin animation-direction($direction-1: $default-animation-direction, $direction-2: false, $direction-3: false, $direction-4: false, $direction-5: false, $direction-6: false, $direction-7: false, $direction-8: false, $direction-9: false, $direction-10: false) {
  $direction: compact($direction-1, $direction-2, $direction-3, $direction-4, $direction-5, $direction-6, $direction-7, $direction-8, $direction-9, $direction-10);
  @include animation-support(animation-direction, $direction); }

// Apply 1-10 animation fill modes.
@mixin animation-fill-mode($mode-1: $default-animation-fill-mode, $mode-2: false, $mode-3: false, $mode-4: false, $mode-5: false, $mode-6: false, $mode-7: false, $mode-8: false, $mode-9: false, $mode-10: false) {
  $mode: compact($mode-1, $mode-2, $mode-3, $mode-4, $mode-5, $mode-6, $mode-7, $mode-8, $mode-9, $mode-10);
  @include animation-support(animation-fill-mode, $mode); }

// Apply 1-10 animation play states.
@mixin animation-play-state($state-1: $default-animation-play-state, $state-2: false, $state-3: false, $state-4: false, $state-5: false, $state-6: false, $state-7: false, $state-8: false, $state-9: false, $state-10: false) {
  $state: compact($state-1, $state-2, $state-3, $state-4, $state-5, $state-6, $state-7, $state-8, $state-9, $state-10);
  @include animation-support(animation-play-state, $state); }

// Shortcut to apply a named animation to an element, with all the settings.
//
//     $animation-1   : Name and settings for the first animation. [<values> | default]
//     ...
//     $animation-10  : Name and settings for the tenth animation. <values>
@mixin animation($animation-1: default, $animation-2: false, $animation-3: false, $animation-4: false, $animation-5: false, $animation-6: false, $animation-7: false, $animation-8: false, $animation-9: false, $animation-10: false) {
  @if $animation-1 == default {
    $animation-1: -compass-space-list(compact($default-animation-name, $default-animation-duration, $default-animation-timing-function, $default-animation-delay, $default-animation-iteration-count, $default-animation-direction, $default-animation-fill-mode, $default-animation-play-state)); }
  $animation: compact($animation-1, $animation-2, $animation-3, $animation-4, $animation-5, $animation-6, $animation-7, $animation-8, $animation-9, $animation-10);
  @include animation-support(animation, $animation); }

//= Trick Compass extension
/*!
 * Trick (v0.4.1) - Helper kit for Compass
 * https://github.com/ourai/trick
 *
 * Copyright 2015, 2016 Ourai Lin (http://ourai.ws/)
 *
 * Date: 2016-10-26
 */

// Unicode

$UN-space: "\0020" !default;
$UN-bullet: "\2022" !default;
$UN-middle_dot: "\00B7" !default;
$UN-wavy-overline: "\FE4B" !default;
$UN-wavy-low_line: "\FE4F" !default;

// CSS Properties

@mixin grayscale( $percent: 100% ) {
  filter: grayscale($percent);
  filter: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg'><filter id='grayscale'><feColorMatrix type='matrix' values='0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0 0 0 1 0' /></filter></svg>#grayscale");
  filter: gray;
  -webkit-filter: grayscale($percent);
  -ms-filter: grayscale($percent);
}



// CSS3 Enhancement

// @mixin supports( $prop_name, $prop_val ) {
//   @supports ($prop_name: $prop_val) or
//             (-o-#{$prop_name}: $prop_val) or
//             (-ms-#{$prop_name}: $prop_val) or
//             (-moz-#{$prop_name}: $prop_val) or
//             (-webkit-#{$prop_name}: $prop_val) {
//     @content;
//   }
// }

@mixin image-set( $args... ) {
  background-image: -webkit-image-set($args);
  background-image: image-set($args);
}

@mixin rotate( $deg: 0deg ) {
  filter:progid:DXImageTransform.Microsoft.Matrix(M11=cos($deg),M12=-sin($deg),M21=sin($deg),M22=cos($deg),SizingMethod="auto expand");
  @include transform(rotate($deg));
}

@mixin linear-gradient( $from, $to ) {
  @include filter-gradient($from, $to);
  @include background-image(linear-gradient($from, $to));
}

// Makes text's vertical alignment middle,
// should invoked on parent node.
@mixin text-middle( $target: "" ) {
  &:before {
    content: $UN-space;
    @include inline-block;
    width: 0;
    height: 100%;
  }

  @if $target != "" {
    #{$target} {
      @include inline-block;
    }
  }
}

@mixin line_feed {
  word-wrap: break-word;
  word-wrap: normal\0;
  word-break: break-all;
  white-space: normal;
}

@mixin square( $size: 100% ) {
  width: $size;
  height: $size;
}

@mixin circle( $size: auto ) {
  @if $size != auto {
    @include square($size);
  }

  @include border-radius(50%);
}

@mixin fill_up {
  @include square(100%);
}

// Keep the aspect ratio
@mixin aspect_ratio( $width: auto, $height: auto, $target: "> *" ) {
  position: relative;
  overflow: hidden;

  &:after {
    content: $UN-space;
    display: block;
    position: relative;
    z-index: -999999999;

    @if $width != auto and $height != auto {
      padding-top: 100% * $height / $width;
    }
  }

  #{$target} {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
  }
}

// Covered Background Image
@mixin covered_background( $url: none, $color: transparent ) {
  @if $url != none {
    $url: image-url($url);
  }

  background: $color $url no-repeat 50% 50%;
  background-size: cover;
}

@mixin unstyled_list {
  list-style-type: none;
  padding-left: 0;
}

//= Tangram layout library
@mixin box-fixed-height(
    $header-selector: "",
    $header-height: auto,
    $footer-selector: "",
    $footer-height: auto,
    $content-selector: "",
    $reset: false
  ) {

  @if $reset != true {
    &,
    #{$header-selector},
    #{$footer-selector} {
      @include box-sizing(border-box);
    }

    #{$header-selector},
    #{$footer-selector} {
      overflow: auto;
    }

    @if $content-selector != "" {
      #{$content-selector} {
        height: 100%;
        overflow: auto;
        @include box-sizing(border-box);
      }
    }
  }

  @if $header-height != auto {
    padding-top: $header-height;

    #{$header-selector} {
      height: $header-height;
      margin-top: -$header-height;
    }
  }

  @if $footer-height != auto {
    padding-bottom: $footer-height;

    #{$footer-selector} {
      height: $footer-height;
      margin-bottom: -$footer-height;
    }
  }

  @content;
}

// Sandwich
// ==========
// An instance of Sticky Footer

@mixin layout-sandwich(
    $header-height: auto,
    $header-selector: ".Layout-header",
    $footer-height: auto,
    $footer-selector: ".Layout-footer",
    $content-selector: ".Layout-content"
  ) {

  &,
  body {
    height: 100%;
  }

  // Main area of page
  // <main class="Layout-content"></main>
  #{$content-selector} {
    min-height: 100%;

    &:before,
    &:after {
      content: "\0020";
      display: block;
      position: relative;
      z-index: -999999999;
      background: transparent none;
      visibility: hidden;
    }
  }

  // Header of page
  @if $header-height != auto {
    #{$header-selector} {
      height: $header-height;
      margin-bottom: -$header-height;
    }
  }

  // Footer of page
  @if $footer-height != auto {
    #{$footer-selector} {
      height: $footer-height;
      margin-top: -$footer-height;
    }
  }

  @if $header-height != auto or $footer-height != auto {
    #{$content-selector} {
      @if $header-height != auto {
        &:before {
          height: $header-height;
        }
      }

      @if $footer-height != auto {
        &:after {
          height: $footer-height;
        }
      }
    }
  }
}

// Frameset

@mixin layout-frameset(
    $sidebar-width: auto,
    $sidebar-pos: left,
    $sidebar-selector: ".Layout-sidebar",
    $header-height: 0,
    $header-selector: ".Layout-header",
    $footer-height: 0,
    $footer-selector: ".Layout-footer",
    $content-selector: ".Layout-content"
  ) {

  &,
  body {
    width: 100%;
    height: 100%;
    min-height: 0;
    zoom: 1;
  }

  body {
    overflow-y: hidden;
    @include box-fixed-height(
      $header-selector, $header-height,
      $footer-selector, $footer-height,
      join($content-selector, $sidebar-selector, comma));
  }

  #{$sidebar-selector} {
    width: $sidebar-width;
    float: $sidebar-pos;
  }
}

// Scroll

@mixin layout-scroll(
    $sidebar-width: auto,
    $sidebar-minHeight: 0,
    $sidebar-selector: ".Layout-sidebar",
    $content-selector: ".Layout-content"
  ) {

  &,
  #{join(body, ($sidebar-selector, $content-selector), comma)} {
    height: 100%;
  }

  body {
    @include pie-clearfix;
  }

  #{$sidebar-selector} {
    width: $sidebar-width;
    float: left;
    min-height: $sidebar-minHeight;
    overflow: hidden;
  }

  #{$content-selector} {
    overflow: auto;
  }
}

//= Reset variables
//= Override Bootstrap

$font-family-sans-serif: "Helvetica Neue", Helvetica, Arial, "Pingfang SC", "Microsoft Yahei", Sans-serif !default;
$font-size-base: 14px !default;
$line-height-base: 1.5 !default;

$navbar-height: 60px !default;



//= Override Font Awesome

$fa-font-path: "../../fontawesome/fonts" !default;



//= Header

$layout-header-height: $navbar-height !default;
$layout-header-bg-color: #1e2332 !default;
$layout-header-border-color: #ffa200 !default;

$layout-brand-image-height: 24px !default;
$layout-brand-font-size: 22px !default;
$layout-brand-font-weight: 300 !default;
$layout-brand-text-color: #fff !default;
$layout-brand-separator-color: #fff !default;
$layout-brand-separator-gap: 21px !default;

$layout-navbar-avatar-size: 30px !default;

$layout-action-trigger-color: $layout-brand-text-color !default;



//= Sidebar

$layout-sidebar-width: 220px !default;
$layout-sidebar-item-hover: #e7e7e7 !default;
$layout-sidebar-top-padding: 20px !default;
$layout-sidebar-bottom-padding: 50px !default;



//= Content

$layout-content-top-padding: 30px !default;
$layout-content-bottom-padding: 30px !default;
$layout-content-heading-font-size: 24px !default;

//= Variables from Buds
/**
 * Variables
 *
 * parts of them are compatible with Bootstrap
 */

$font-family-sans-serif: "Helvetica Neue", Helvetica, Arial, "Pingfang SC", "Microsoft Yahei", Sans-serif !default;
$font-family-base: $font-family-sans-serif !default;
$font-size-base: 14px !default;
$font-weight-base: 300 !default;
$line-height-base: 1.5 !default;
$text-color: #333 !default;

//= Variables and mixins from Bootstrap
$bootstrap-sass-asset-helper: false !default;
//
// Variables
// --------------------------------------------------


//== Colors
//
//## Gray and brand colors for use across Bootstrap.

$gray-base:              #000 !default;
$gray-darker:            lighten($gray-base, 13.5%) !default; // #222
$gray-dark:              lighten($gray-base, 20%) !default;   // #333
$gray:                   lighten($gray-base, 33.5%) !default; // #555
$gray-light:             lighten($gray-base, 46.7%) !default; // #777
$gray-lighter:           lighten($gray-base, 93.5%) !default; // #eee

$brand-primary:         darken(#428bca, 6.5%) !default; // #337ab7
$brand-success:         #5cb85c !default;
$brand-info:            #5bc0de !default;
$brand-warning:         #f0ad4e !default;
$brand-danger:          #d9534f !default;


//== Scaffolding
//
//## Settings for some of the most global styles.

//** Background color for `<body>`.
$body-bg:               #fff !default;
//** Global text color on `<body>`.
$text-color:            $gray-dark !default;

//** Global textual link color.
$link-color:            $brand-primary !default;
//** Link hover color set via `darken()` function.
$link-hover-color:      darken($link-color, 15%) !default;
//** Link hover decoration.
$link-hover-decoration: underline !default;


//== Typography
//
//## Font, line-height, and color for body text, headings, and more.

$font-family-sans-serif:  "Helvetica Neue", Helvetica, Arial, sans-serif !default;
$font-family-serif:       Georgia, "Times New Roman", Times, serif !default;
//** Default monospace fonts for `<code>`, `<kbd>`, and `<pre>`.
$font-family-monospace:   Menlo, Monaco, Consolas, "Courier New", monospace !default;
$font-family-base:        $font-family-sans-serif !default;

$font-size-base:          14px !default;
$font-size-large:         ceil(($font-size-base * 1.25)) !default; // ~18px
$font-size-small:         ceil(($font-size-base * 0.85)) !default; // ~12px

$font-size-h1:            floor(($font-size-base * 2.6)) !default; // ~36px
$font-size-h2:            floor(($font-size-base * 2.15)) !default; // ~30px
$font-size-h3:            ceil(($font-size-base * 1.7)) !default; // ~24px
$font-size-h4:            ceil(($font-size-base * 1.25)) !default; // ~18px
$font-size-h5:            $font-size-base !default;
$font-size-h6:            ceil(($font-size-base * 0.85)) !default; // ~12px

//** Unit-less `line-height` for use in components like buttons.
$line-height-base:        1.428571429 !default; // 20/14
//** Computed "line-height" (`font-size` * `line-height`) for use with `margin`, `padding`, etc.
$line-height-computed:    floor(($font-size-base * $line-height-base)) !default; // ~20px

//** By default, this inherits from the `<body>`.
$headings-font-family:    inherit !default;
$headings-font-weight:    500 !default;
$headings-line-height:    1.1 !default;
$headings-color:          inherit !default;


//== Iconography
//
//## Specify custom location and filename of the included Glyphicons icon font. Useful for those including Bootstrap via Bower.

//** Load fonts from this directory.

// [converter] If $bootstrap-sass-asset-helper if used, provide path relative to the assets load path.
// [converter] This is because some asset helpers, such as Sprockets, do not work with file-relative paths.
$icon-font-path: if($bootstrap-sass-asset-helper, "bootstrap/", "../fonts/bootstrap/") !default;

//** File name for all font files.
$icon-font-name:          "glyphicons-halflings-regular" !default;
//** Element ID within SVG icon file.
$icon-font-svg-id:        "glyphicons_halflingsregular" !default;


//== Components
//
//## Define common padding and border radius sizes and more. Values based on 14px text and 1.428 line-height (~20px to start).

$padding-base-vertical:     6px !default;
$padding-base-horizontal:   12px !default;

$padding-large-vertical:    10px !default;
$padding-large-horizontal:  16px !default;

$padding-small-vertical:    5px !default;
$padding-small-horizontal:  10px !default;

$padding-xs-vertical:       1px !default;
$padding-xs-horizontal:     5px !default;

$line-height-large:         1.3333333 !default; // extra decimals for Win 8.1 Chrome
$line-height-small:         1.5 !default;

$border-radius-base:        4px !default;
$border-radius-large:       6px !default;
$border-radius-small:       3px !default;

//** Global color for active items (e.g., navs or dropdowns).
$component-active-color:    #fff !default;
//** Global background color for active items (e.g., navs or dropdowns).
$component-active-bg:       $brand-primary !default;

//** Width of the `border` for generating carets that indicate dropdowns.
$caret-width-base:          4px !default;
//** Carets increase slightly in size for larger components.
$caret-width-large:         5px !default;


//== Tables
//
//## Customizes the `.table` component with basic values, each used across all table variations.

//** Padding for `<th>`s and `<td>`s.
$table-cell-padding:            8px !default;
//** Padding for cells in `.table-condensed`.
$table-condensed-cell-padding:  5px !default;

//** Default background color used for all tables.
$table-bg:                      transparent !default;
//** Background color used for `.table-striped`.
$table-bg-accent:               #f9f9f9 !default;
//** Background color used for `.table-hover`.
$table-bg-hover:                #f5f5f5 !default;
$table-bg-active:               $table-bg-hover !default;

//** Border color for table and cell borders.
$table-border-color:            #ddd !default;


//== Buttons
//
//## For each of Bootstrap's buttons, define text, background and border color.

$btn-font-weight:                normal !default;

$btn-default-color:              #333 !default;
$btn-default-bg:                 #fff !default;
$btn-default-border:             #ccc !default;

$btn-primary-color:              #fff !default;
$btn-primary-bg:                 $brand-primary !default;
$btn-primary-border:             darken($btn-primary-bg, 5%) !default;

$btn-success-color:              #fff !default;
$btn-success-bg:                 $brand-success !default;
$btn-success-border:             darken($btn-success-bg, 5%) !default;

$btn-info-color:                 #fff !default;
$btn-info-bg:                    $brand-info !default;
$btn-info-border:                darken($btn-info-bg, 5%) !default;

$btn-warning-color:              #fff !default;
$btn-warning-bg:                 $brand-warning !default;
$btn-warning-border:             darken($btn-warning-bg, 5%) !default;

$btn-danger-color:               #fff !default;
$btn-danger-bg:                  $brand-danger !default;
$btn-danger-border:              darken($btn-danger-bg, 5%) !default;

$btn-link-disabled-color:        $gray-light !default;

// Allows for customizing button radius independently from global border radius
$btn-border-radius-base:         $border-radius-base !default;
$btn-border-radius-large:        $border-radius-large !default;
$btn-border-radius-small:        $border-radius-small !default;


//== Forms
//
//##

//** `<input>` background color
$input-bg:                       #fff !default;
//** `<input disabled>` background color
$input-bg-disabled:              $gray-lighter !default;

//** Text color for `<input>`s
$input-color:                    $gray !default;
//** `<input>` border color
$input-border:                   #ccc !default;

// TODO: Rename `$input-border-radius` to `$input-border-radius-base` in v4
//** Default `.form-control` border radius
// This has no effect on `<select>`s in some browsers, due to the limited stylability of `<select>`s in CSS.
$input-border-radius:            $border-radius-base !default;
//** Large `.form-control` border radius
$input-border-radius-large:      $border-radius-large !default;
//** Small `.form-control` border radius
$input-border-radius-small:      $border-radius-small !default;

//** Border color for inputs on focus
$input-border-focus:             #66afe9 !default;

//** Placeholder text color
$input-color-placeholder:        #999 !default;

//** Default `.form-control` height
$input-height-base:              ($line-height-computed + ($padding-base-vertical * 2) + 2) !default;
//** Large `.form-control` height
$input-height-large:             (ceil($font-size-large * $line-height-large) + ($padding-large-vertical * 2) + 2) !default;
//** Small `.form-control` height
$input-height-small:             (floor($font-size-small * $line-height-small) + ($padding-small-vertical * 2) + 2) !default;

//** `.form-group` margin
$form-group-margin-bottom:       15px !default;

$legend-color:                   $gray-dark !default;
$legend-border-color:            #e5e5e5 !default;

//** Background color for textual input addons
$input-group-addon-bg:           $gray-lighter !default;
//** Border color for textual input addons
$input-group-addon-border-color: $input-border !default;

//** Disabled cursor for form controls and buttons.
$cursor-disabled:                not-allowed !default;


//== Dropdowns
//
//## Dropdown menu container and contents.

//** Background for the dropdown menu.
$dropdown-bg:                    #fff !default;
//** Dropdown menu `border-color`.
$dropdown-border:                rgba(0,0,0,.15) !default;
//** Dropdown menu `border-color` **for IE8**.
$dropdown-fallback-border:       #ccc !default;
//** Divider color for between dropdown items.
$dropdown-divider-bg:            #e5e5e5 !default;

//** Dropdown link text color.
$dropdown-link-color:            $gray-dark !default;
//** Hover color for dropdown links.
$dropdown-link-hover-color:      darken($gray-dark, 5%) !default;
//** Hover background for dropdown links.
$dropdown-link-hover-bg:         #f5f5f5 !default;

//** Active dropdown menu item text color.
$dropdown-link-active-color:     $component-active-color !default;
//** Active dropdown menu item background color.
$dropdown-link-active-bg:        $component-active-bg !default;

//** Disabled dropdown menu item background color.
$dropdown-link-disabled-color:   $gray-light !default;

//** Text color for headers within dropdown menus.
$dropdown-header-color:          $gray-light !default;

//** Deprecated `$dropdown-caret-color` as of v3.1.0
$dropdown-caret-color:           #000 !default;


//-- Z-index master list
//
// Warning: Avoid customizing these values. They're used for a bird's eye view
// of components dependent on the z-axis and are designed to all work together.
//
// Note: These variables are not generated into the Customizer.

$zindex-navbar:            1000 !default;
$zindex-dropdown:          1000 !default;
$zindex-popover:           1060 !default;
$zindex-tooltip:           1070 !default;
$zindex-navbar-fixed:      1030 !default;
$zindex-modal-background:  1040 !default;
$zindex-modal:             1050 !default;


//== Media queries breakpoints
//
//## Define the breakpoints at which your layout will change, adapting to different screen sizes.

// Extra small screen / phone
//** Deprecated `$screen-xs` as of v3.0.1
$screen-xs:                  480px !default;
//** Deprecated `$screen-xs-min` as of v3.2.0
$screen-xs-min:              $screen-xs !default;
//** Deprecated `$screen-phone` as of v3.0.1
$screen-phone:               $screen-xs-min !default;

// Small screen / tablet
//** Deprecated `$screen-sm` as of v3.0.1
$screen-sm:                  768px !default;
$screen-sm-min:              $screen-sm !default;
//** Deprecated `$screen-tablet` as of v3.0.1
$screen-tablet:              $screen-sm-min !default;

// Medium screen / desktop
//** Deprecated `$screen-md` as of v3.0.1
$screen-md:                  992px !default;
$screen-md-min:              $screen-md !default;
//** Deprecated `$screen-desktop` as of v3.0.1
$screen-desktop:             $screen-md-min !default;

// Large screen / wide desktop
//** Deprecated `$screen-lg` as of v3.0.1
$screen-lg:                  1200px !default;
$screen-lg-min:              $screen-lg !default;
//** Deprecated `$screen-lg-desktop` as of v3.0.1
$screen-lg-desktop:          $screen-lg-min !default;

// So media queries don't overlap when required, provide a maximum
$screen-xs-max:              ($screen-sm-min - 1) !default;
$screen-sm-max:              ($screen-md-min - 1) !default;
$screen-md-max:              ($screen-lg-min - 1) !default;


//== Grid system
//
//## Define your custom responsive grid.

//** Number of columns in the grid.
$grid-columns:              12 !default;
//** Padding between columns. Gets divided in half for the left and right.
$grid-gutter-width:         30px !default;
// Navbar collapse
//** Point at which the navbar becomes uncollapsed.
$grid-float-breakpoint:     $screen-sm-min !default;
//** Point at which the navbar begins collapsing.
$grid-float-breakpoint-max: ($grid-float-breakpoint - 1) !default;


//== Container sizes
//
//## Define the maximum width of `.container` for different screen sizes.

// Small screen / tablet
$container-tablet:             (720px + $grid-gutter-width) !default;
//** For `$screen-sm-min` and up.
$container-sm:                 $container-tablet !default;

// Medium screen / desktop
$container-desktop:            (940px + $grid-gutter-width) !default;
//** For `$screen-md-min` and up.
$container-md:                 $container-desktop !default;

// Large screen / wide desktop
$container-large-desktop:      (1140px + $grid-gutter-width) !default;
//** For `$screen-lg-min` and up.
$container-lg:                 $container-large-desktop !default;


//== Navbar
//
//##

// Basics of a navbar
$navbar-height:                    50px !default;
$navbar-margin-bottom:             $line-height-computed !default;
$navbar-border-radius:             $border-radius-base !default;
$navbar-padding-horizontal:        floor(($grid-gutter-width / 2)) !default;
$navbar-padding-vertical:          (($navbar-height - $line-height-computed) / 2) !default;
$navbar-collapse-max-height:       340px !default;

$navbar-default-color:             #777 !default;
$navbar-default-bg:                #f8f8f8 !default;
$navbar-default-border:            darken($navbar-default-bg, 6.5%) !default;

// Navbar links
$navbar-default-link-color:                #777 !default;
$navbar-default-link-hover-color:          #333 !default;
$navbar-default-link-hover-bg:             transparent !default;
$navbar-default-link-active-color:         #555 !default;
$navbar-default-link-active-bg:            darken($navbar-default-bg, 6.5%) !default;
$navbar-default-link-disabled-color:       #ccc !default;
$navbar-default-link-disabled-bg:          transparent !default;

// Navbar brand label
$navbar-default-brand-color:               $navbar-default-link-color !default;
$navbar-default-brand-hover-color:         darken($navbar-default-brand-color, 10%) !default;
$navbar-default-brand-hover-bg:            transparent !default;

// Navbar toggle
$navbar-default-toggle-hover-bg:           #ddd !default;
$navbar-default-toggle-icon-bar-bg:        #888 !default;
$navbar-default-toggle-border-color:       #ddd !default;


//=== Inverted navbar
// Reset inverted navbar basics
$navbar-inverse-color:                      lighten($gray-light, 15%) !default;
$navbar-inverse-bg:                         #222 !default;
$navbar-inverse-border:                     darken($navbar-inverse-bg, 10%) !default;

// Inverted navbar links
$navbar-inverse-link-color:                 lighten($gray-light, 15%) !default;
$navbar-inverse-link-hover-color:           #fff !default;
$navbar-inverse-link-hover-bg:              transparent !default;
$navbar-inverse-link-active-color:          $navbar-inverse-link-hover-color !default;
$navbar-inverse-link-active-bg:             darken($navbar-inverse-bg, 10%) !default;
$navbar-inverse-link-disabled-color:        #444 !default;
$navbar-inverse-link-disabled-bg:           transparent !default;

// Inverted navbar brand label
$navbar-inverse-brand-color:                $navbar-inverse-link-color !default;
$navbar-inverse-brand-hover-color:          #fff !default;
$navbar-inverse-brand-hover-bg:             transparent !default;

// Inverted navbar toggle
$navbar-inverse-toggle-hover-bg:            #333 !default;
$navbar-inverse-toggle-icon-bar-bg:         #fff !default;
$navbar-inverse-toggle-border-color:        #333 !default;


//== Navs
//
//##

//=== Shared nav styles
$nav-link-padding:                          10px 15px !default;
$nav-link-hover-bg:                         $gray-lighter !default;

$nav-disabled-link-color:                   $gray-light !default;
$nav-disabled-link-hover-color:             $gray-light !default;

//== Tabs
$nav-tabs-border-color:                     #ddd !default;

$nav-tabs-link-hover-border-color:          $gray-lighter !default;

$nav-tabs-active-link-hover-bg:             $body-bg !default;
$nav-tabs-active-link-hover-color:          $gray !default;
$nav-tabs-active-link-hover-border-color:   #ddd !default;

$nav-tabs-justified-link-border-color:            #ddd !default;
$nav-tabs-justified-active-link-border-color:     $body-bg !default;

//== Pills
$nav-pills-border-radius:                   $border-radius-base !default;
$nav-pills-active-link-hover-bg:            $component-active-bg !default;
$nav-pills-active-link-hover-color:         $component-active-color !default;


//== Pagination
//
//##

$pagination-color:                     $link-color !default;
$pagination-bg:                        #fff !default;
$pagination-border:                    #ddd !default;

$pagination-hover-color:               $link-hover-color !default;
$pagination-hover-bg:                  $gray-lighter !default;
$pagination-hover-border:              #ddd !default;

$pagination-active-color:              #fff !default;
$pagination-active-bg:                 $brand-primary !default;
$pagination-active-border:             $brand-primary !default;

$pagination-disabled-color:            $gray-light !default;
$pagination-disabled-bg:               #fff !default;
$pagination-disabled-border:           #ddd !default;


//== Pager
//
//##

$pager-bg:                             $pagination-bg !default;
$pager-border:                         $pagination-border !default;
$pager-border-radius:                  15px !default;

$pager-hover-bg:                       $pagination-hover-bg !default;

$pager-active-bg:                      $pagination-active-bg !default;
$pager-active-color:                   $pagination-active-color !default;

$pager-disabled-color:                 $pagination-disabled-color !default;


//== Jumbotron
//
//##

$jumbotron-padding:              30px !default;
$jumbotron-color:                inherit !default;
$jumbotron-bg:                   $gray-lighter !default;
$jumbotron-heading-color:        inherit !default;
$jumbotron-font-size:            ceil(($font-size-base * 1.5)) !default;
$jumbotron-heading-font-size:    ceil(($font-size-base * 4.5)) !default;


//== Form states and alerts
//
//## Define colors for form feedback states and, by default, alerts.

$state-success-text:             #3c763d !default;
$state-success-bg:               #dff0d8 !default;
$state-success-border:           darken(adjust-hue($state-success-bg, -10), 5%) !default;

$state-info-text:                #31708f !default;
$state-info-bg:                  #d9edf7 !default;
$state-info-border:              darken(adjust-hue($state-info-bg, -10), 7%) !default;

$state-warning-text:             #8a6d3b !default;
$state-warning-bg:               #fcf8e3 !default;
$state-warning-border:           darken(adjust-hue($state-warning-bg, -10), 5%) !default;

$state-danger-text:              #a94442 !default;
$state-danger-bg:                #f2dede !default;
$state-danger-border:            darken(adjust-hue($state-danger-bg, -10), 5%) !default;


//== Tooltips
//
//##

//** Tooltip max width
$tooltip-max-width:           200px !default;
//** Tooltip text color
$tooltip-color:               #fff !default;
//** Tooltip background color
$tooltip-bg:                  #000 !default;
$tooltip-opacity:             .9 !default;

//** Tooltip arrow width
$tooltip-arrow-width:         5px !default;
//** Tooltip arrow color
$tooltip-arrow-color:         $tooltip-bg !default;


//== Popovers
//
//##

//** Popover body background color
$popover-bg:                          #fff !default;
//** Popover maximum width
$popover-max-width:                   276px !default;
//** Popover border color
$popover-border-color:                rgba(0,0,0,.2) !default;
//** Popover fallback border color
$popover-fallback-border-color:       #ccc !default;

//** Popover title background color
$popover-title-bg:                    darken($popover-bg, 3%) !default;

//** Popover arrow width
$popover-arrow-width:                 10px !default;
//** Popover arrow color
$popover-arrow-color:                 $popover-bg !default;

//** Popover outer arrow width
$popover-arrow-outer-width:           ($popover-arrow-width + 1) !default;
//** Popover outer arrow color
$popover-arrow-outer-color:           fade_in($popover-border-color, 0.05) !default;
//** Popover outer arrow fallback color
$popover-arrow-outer-fallback-color:  darken($popover-fallback-border-color, 20%) !default;


//== Labels
//
//##

//** Default label background color
$label-default-bg:            $gray-light !default;
//** Primary label background color
$label-primary-bg:            $brand-primary !default;
//** Success label background color
$label-success-bg:            $brand-success !default;
//** Info label background color
$label-info-bg:               $brand-info !default;
//** Warning label background color
$label-warning-bg:            $brand-warning !default;
//** Danger label background color
$label-danger-bg:             $brand-danger !default;

//** Default label text color
$label-color:                 #fff !default;
//** Default text color of a linked label
$label-link-hover-color:      #fff !default;


//== Modals
//
//##

//** Padding applied to the modal body
$modal-inner-padding:         15px !default;

//** Padding applied to the modal title
$modal-title-padding:         15px !default;
//** Modal title line-height
$modal-title-line-height:     $line-height-base !default;

//** Background color of modal content area
$modal-content-bg:                             #fff !default;
//** Modal content border color
$modal-content-border-color:                   rgba(0,0,0,.2) !default;
//** Modal content border color **for IE8**
$modal-content-fallback-border-color:          #999 !default;

//** Modal backdrop background color
$modal-backdrop-bg:           #000 !default;
//** Modal backdrop opacity
$modal-backdrop-opacity:      .5 !default;
//** Modal header border color
$modal-header-border-color:   #e5e5e5 !default;
//** Modal footer border color
$modal-footer-border-color:   $modal-header-border-color !default;

$modal-lg:                    900px !default;
$modal-md:                    600px !default;
$modal-sm:                    300px !default;


//== Alerts
//
//## Define alert colors, border radius, and padding.

$alert-padding:               15px !default;
$alert-border-radius:         $border-radius-base !default;
$alert-link-font-weight:      bold !default;

$alert-success-bg:            $state-success-bg !default;
$alert-success-text:          $state-success-text !default;
$alert-success-border:        $state-success-border !default;

$alert-info-bg:               $state-info-bg !default;
$alert-info-text:             $state-info-text !default;
$alert-info-border:           $state-info-border !default;

$alert-warning-bg:            $state-warning-bg !default;
$alert-warning-text:          $state-warning-text !default;
$alert-warning-border:        $state-warning-border !default;

$alert-danger-bg:             $state-danger-bg !default;
$alert-danger-text:           $state-danger-text !default;
$alert-danger-border:         $state-danger-border !default;


//== Progress bars
//
//##

//** Background color of the whole progress component
$progress-bg:                 #f5f5f5 !default;
//** Progress bar text color
$progress-bar-color:          #fff !default;
//** Variable for setting rounded corners on progress bar.
$progress-border-radius:      $border-radius-base !default;

//** Default progress bar color
$progress-bar-bg:             $brand-primary !default;
//** Success progress bar color
$progress-bar-success-bg:     $brand-success !default;
//** Warning progress bar color
$progress-bar-warning-bg:     $brand-warning !default;
//** Danger progress bar color
$progress-bar-danger-bg:      $brand-danger !default;
//** Info progress bar color
$progress-bar-info-bg:        $brand-info !default;


//== List group
//
//##

//** Background color on `.list-group-item`
$list-group-bg:                 #fff !default;
//** `.list-group-item` border color
$list-group-border:             #ddd !default;
//** List group border radius
$list-group-border-radius:      $border-radius-base !default;

//** Background color of single list items on hover
$list-group-hover-bg:           #f5f5f5 !default;
//** Text color of active list items
$list-group-active-color:       $component-active-color !default;
//** Background color of active list items
$list-group-active-bg:          $component-active-bg !default;
//** Border color of active list elements
$list-group-active-border:      $list-group-active-bg !default;
//** Text color for content within active list items
$list-group-active-text-color:  lighten($list-group-active-bg, 40%) !default;

//** Text color of disabled list items
$list-group-disabled-color:      $gray-light !default;
//** Background color of disabled list items
$list-group-disabled-bg:         $gray-lighter !default;
//** Text color for content within disabled list items
$list-group-disabled-text-color: $list-group-disabled-color !default;

$list-group-link-color:         #555 !default;
$list-group-link-hover-color:   $list-group-link-color !default;
$list-group-link-heading-color: #333 !default;


//== Panels
//
//##

$panel-bg:                    #fff !default;
$panel-body-padding:          15px !default;
$panel-heading-padding:       10px 15px !default;
$panel-footer-padding:        $panel-heading-padding !default;
$panel-border-radius:         $border-radius-base !default;

//** Border color for elements within panels
$panel-inner-border:          #ddd !default;
$panel-footer-bg:             #f5f5f5 !default;

$panel-default-text:          $gray-dark !default;
$panel-default-border:        #ddd !default;
$panel-default-heading-bg:    #f5f5f5 !default;

$panel-primary-text:          #fff !default;
$panel-primary-border:        $brand-primary !default;
$panel-primary-heading-bg:    $brand-primary !default;

$panel-success-text:          $state-success-text !default;
$panel-success-border:        $state-success-border !default;
$panel-success-heading-bg:    $state-success-bg !default;

$panel-info-text:             $state-info-text !default;
$panel-info-border:           $state-info-border !default;
$panel-info-heading-bg:       $state-info-bg !default;

$panel-warning-text:          $state-warning-text !default;
$panel-warning-border:        $state-warning-border !default;
$panel-warning-heading-bg:    $state-warning-bg !default;

$panel-danger-text:           $state-danger-text !default;
$panel-danger-border:         $state-danger-border !default;
$panel-danger-heading-bg:     $state-danger-bg !default;


//== Thumbnails
//
//##

//** Padding around the thumbnail image
$thumbnail-padding:           4px !default;
//** Thumbnail background color
$thumbnail-bg:                $body-bg !default;
//** Thumbnail border color
$thumbnail-border:            #ddd !default;
//** Thumbnail border radius
$thumbnail-border-radius:     $border-radius-base !default;

//** Custom text color for thumbnail captions
$thumbnail-caption-color:     $text-color !default;
//** Padding around the thumbnail caption
$thumbnail-caption-padding:   9px !default;


//== Wells
//
//##

$well-bg:                     #f5f5f5 !default;
$well-border:                 darken($well-bg, 7%) !default;


//== Badges
//
//##

$badge-color:                 #fff !default;
//** Linked badge text color on hover
$badge-link-hover-color:      #fff !default;
$badge-bg:                    $gray-light !default;

//** Badge text color in active nav link
$badge-active-color:          $link-color !default;
//** Badge background color in active nav link
$badge-active-bg:             #fff !default;

$badge-font-weight:           bold !default;
$badge-line-height:           1 !default;
$badge-border-radius:         10px !default;


//== Breadcrumbs
//
//##

$breadcrumb-padding-vertical:   8px !default;
$breadcrumb-padding-horizontal: 15px !default;
//** Breadcrumb background color
$breadcrumb-bg:                 #f5f5f5 !default;
//** Breadcrumb text color
$breadcrumb-color:              #ccc !default;
//** Text color of current page in the breadcrumb
$breadcrumb-active-color:       $gray-light !default;
//** Textual separator for between breadcrumb elements
$breadcrumb-separator:          "/" !default;


//== Carousel
//
//##

$carousel-text-shadow:                        0 1px 2px rgba(0,0,0,.6) !default;

$carousel-control-color:                      #fff !default;
$carousel-control-width:                      15% !default;
$carousel-control-opacity:                    .5 !default;
$carousel-control-font-size:                  20px !default;

$carousel-indicator-active-bg:                #fff !default;
$carousel-indicator-border-color:             #fff !default;

$carousel-caption-color:                      #fff !default;


//== Close
//
//##

$close-font-weight:           bold !default;
$close-color:                 #000 !default;
$close-text-shadow:           0 1px 0 #fff !default;


//== Code
//
//##

$code-color:                  #c7254e !default;
$code-bg:                     #f9f2f4 !default;

$kbd-color:                   #fff !default;
$kbd-bg:                      #333 !default;

$pre-bg:                      #f5f5f5 !default;
$pre-color:                   $gray-dark !default;
$pre-border-color:            #ccc !default;
$pre-scrollable-max-height:   340px !default;


//== Type
//
//##

//** Horizontal offset for forms and lists.
$component-offset-horizontal: 180px !default;
//** Text muted color
$text-muted:                  $gray-light !default;
//** Abbreviations and acronyms border color
$abbr-border-color:           $gray-light !default;
//** Headings small color
$headings-small-color:        $gray-light !default;
//** Blockquote small color
$blockquote-small-color:      $gray-light !default;
//** Blockquote font size
$blockquote-font-size:        ($font-size-base * 1.25) !default;
//** Blockquote border color
$blockquote-border-color:     $gray-lighter !default;
//** Page header border color
$page-header-border-color:    $gray-lighter !default;
//** Width of horizontal description list titles
$dl-horizontal-offset:        $component-offset-horizontal !default;
//** Point at which .dl-horizontal becomes horizontal
$dl-horizontal-breakpoint:    $grid-float-breakpoint !default;
//** Horizontal line color.
$hr-border:                   $gray-lighter !default;

// Mixins
// --------------------------------------------------

// Utilities
// CSS image replacement
//
// Heads up! v3 launched with only `.hide-text()`, but per our pattern for
// mixins being reused as classes with the same name, this doesn't hold up. As
// of v3.0.1 we have added `.text-hide()` and deprecated `.hide-text()`.
//
// Source: https://github.com/h5bp/html5-boilerplate/commit/aa0396eae757

// Deprecated as of v3.0.1 (has been removed in v4)
@mixin hide-text() {
  font: 0/0 a;
  color: transparent;
  text-shadow: none;
  background-color: transparent;
  border: 0;
}

// New mixin to use as of v3.0.1
@mixin text-hide() {
  @include hide-text;
}

// Opacity

@mixin opacity($opacity) {
  opacity: $opacity;
  // IE8 filter
  $opacity-ie: ($opacity * 100);
  filter: alpha(opacity=$opacity-ie);
}

// Image Mixins
// - Responsive image
// - Retina image


// Responsive image
//
// Keep images from scaling beyond the width of their parents.
@mixin img-responsive($display: block) {
  display: $display;
  max-width: 100%; // Part 1: Set a maximum relative to the parent
  height: auto; // Part 2: Scale the height according to the width, otherwise you get stretching
}


// Retina image
//
// Short retina mixin for setting background-image and -size. Note that the
// spelling of `min--moz-device-pixel-ratio` is intentional.
@mixin img-retina($file-1x, $file-2x, $width-1x, $height-1x) {
  background-image: url(if($bootstrap-sass-asset-helper, twbs-image-path("#{$file-1x}"), "#{$file-1x}"));

  @media
  only screen and (-webkit-min-device-pixel-ratio: 2),
  only screen and (   min--moz-device-pixel-ratio: 2),
  only screen and (     -o-min-device-pixel-ratio: 2/1),
  only screen and (        min-device-pixel-ratio: 2),
  only screen and (                min-resolution: 192dpi),
  only screen and (                min-resolution: 2dppx) {
    background-image: url(if($bootstrap-sass-asset-helper, twbs-image-path("#{$file-2x}"), "#{$file-2x}"));
    background-size: $width-1x $height-1x;
  }
}

// Labels

@mixin label-variant($color) {
  background-color: $color;

  &[href] {
    &:hover,
    &:focus {
      background-color: darken($color, 10%);
    }
  }
}

// Reset filters for IE
//
// When you need to remove a gradient background, do not forget to use this to reset
// the IE filter for IE9 and below.

@mixin reset-filter() {
  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
}

// Resize anything

@mixin resizable($direction) {
  resize: $direction; // Options: horizontal, vertical, both
  overflow: auto; // Per CSS3 UI, `resize` only applies when `overflow` isn't `visible`
}

// Responsive utilities

//
// More easily include all the states for responsive-utilities.less.
// [converter] $parent hack
@mixin responsive-visibility($parent) {
  #{$parent} {
    display: block !important;
  }
  table#{$parent}  { display: table !important; }
  tr#{$parent}     { display: table-row !important; }
  th#{$parent},
  td#{$parent}     { display: table-cell !important; }
}

// [converter] $parent hack
@mixin responsive-invisibility($parent) {
  #{$parent} {
    display: none !important;
  }
}

// Sizing shortcuts

@mixin size($width, $height) {
  width: $width;
  height: $height;
}

@mixin square($size) {
  @include size($size, $size);
}

// WebKit-style focus

@mixin tab-focus() {
  // WebKit-specific. Other browsers will keep their default outline style.
  // (Initially tried to also force default via `outline: initial`,
  // but that seems to erroneously remove the outline in Firefox altogether.)
  outline: 5px auto -webkit-focus-ring-color;
  outline-offset: -2px;
}

@mixin reset-text() {
  font-family: $font-family-base;
  // We deliberately do NOT reset font-size.
  font-style: normal;
  font-weight: normal;
  letter-spacing: normal;
  line-break: auto;
  line-height: $line-height-base;
  text-align: left; // Fallback for where `start` is not supported
  text-align: start;
  text-decoration: none;
  text-shadow: none;
  text-transform: none;
  white-space: normal;
  word-break: normal;
  word-spacing: normal;
  word-wrap: normal;
}

// Typography

// [converter] $parent hack
@mixin text-emphasis-variant($parent, $color) {
  #{$parent} {
    color: $color;
  }
  a#{$parent}:hover,
  a#{$parent}:focus {
    color: darken($color, 10%);
  }
}

// Text overflow
// Requires inline-block or block for proper styling

@mixin text-overflow() {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

// Vendor Prefixes
//
// All vendor mixins are deprecated as of v3.2.0 due to the introduction of
// Autoprefixer in our Gruntfile. They have been removed in v4.

// - Animations
// - Backface visibility
// - Box shadow
// - Box sizing
// - Content columns
// - Hyphens
// - Placeholder text
// - Transformations
// - Transitions
// - User Select


// Animations
@mixin animation($animation) {
  -webkit-animation: $animation;
       -o-animation: $animation;
          animation: $animation;
}
@mixin animation-name($name) {
  -webkit-animation-name: $name;
          animation-name: $name;
}
@mixin animation-duration($duration) {
  -webkit-animation-duration: $duration;
          animation-duration: $duration;
}
@mixin animation-timing-function($timing-function) {
  -webkit-animation-timing-function: $timing-function;
          animation-timing-function: $timing-function;
}
@mixin animation-delay($delay) {
  -webkit-animation-delay: $delay;
          animation-delay: $delay;
}
@mixin animation-iteration-count($iteration-count) {
  -webkit-animation-iteration-count: $iteration-count;
          animation-iteration-count: $iteration-count;
}
@mixin animation-direction($direction) {
  -webkit-animation-direction: $direction;
          animation-direction: $direction;
}
@mixin animation-fill-mode($fill-mode) {
  -webkit-animation-fill-mode: $fill-mode;
          animation-fill-mode: $fill-mode;
}

// Backface visibility
// Prevent browsers from flickering when using CSS 3D transforms.
// Default value is `visible`, but can be changed to `hidden`

@mixin backface-visibility($visibility) {
  -webkit-backface-visibility: $visibility;
     -moz-backface-visibility: $visibility;
          backface-visibility: $visibility;
}

// Drop shadows
//
// Note: Deprecated `.box-shadow()` as of v3.1.0 since all of Bootstrap's
// supported browsers that have box shadow capabilities now support it.

@mixin box-shadow($shadow...) {
  -webkit-box-shadow: $shadow; // iOS <4.3 & Android <4.1
          box-shadow: $shadow;
}

// Box sizing
@mixin box-sizing($boxmodel) {
  -webkit-box-sizing: $boxmodel;
     -moz-box-sizing: $boxmodel;
          box-sizing: $boxmodel;
}

// CSS3 Content Columns
@mixin content-columns($column-count, $column-gap: $grid-gutter-width) {
  -webkit-column-count: $column-count;
     -moz-column-count: $column-count;
          column-count: $column-count;
  -webkit-column-gap: $column-gap;
     -moz-column-gap: $column-gap;
          column-gap: $column-gap;
}

// Optional hyphenation
@mixin hyphens($mode: auto) {
  word-wrap: break-word;
  -webkit-hyphens: $mode;
     -moz-hyphens: $mode;
      -ms-hyphens: $mode; // IE10+
       -o-hyphens: $mode;
          hyphens: $mode;
}

// Placeholder text
@mixin placeholder($color: $input-color-placeholder) {
  // Firefox
  &::-moz-placeholder {
    color: $color;
    opacity: 1; // Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526
  }
  &:-ms-input-placeholder { color: $color; } // Internet Explorer 10+
  &::-webkit-input-placeholder  { color: $color; } // Safari and Chrome
}

// Transformations
@mixin scale($ratio...) {
  -webkit-transform: scale($ratio);
      -ms-transform: scale($ratio); // IE9 only
       -o-transform: scale($ratio);
          transform: scale($ratio);
}

@mixin scaleX($ratio) {
  -webkit-transform: scaleX($ratio);
      -ms-transform: scaleX($ratio); // IE9 only
       -o-transform: scaleX($ratio);
          transform: scaleX($ratio);
}
@mixin scaleY($ratio) {
  -webkit-transform: scaleY($ratio);
      -ms-transform: scaleY($ratio); // IE9 only
       -o-transform: scaleY($ratio);
          transform: scaleY($ratio);
}
@mixin skew($x, $y) {
  -webkit-transform: skewX($x) skewY($y);
      -ms-transform: skewX($x) skewY($y); // See https://github.com/twbs/bootstrap/issues/4885; IE9+
       -o-transform: skewX($x) skewY($y);
          transform: skewX($x) skewY($y);
}
@mixin translate($x, $y) {
  -webkit-transform: translate($x, $y);
      -ms-transform: translate($x, $y); // IE9 only
       -o-transform: translate($x, $y);
          transform: translate($x, $y);
}
@mixin translate3d($x, $y, $z) {
  -webkit-transform: translate3d($x, $y, $z);
          transform: translate3d($x, $y, $z);
}
@mixin rotate($degrees) {
  -webkit-transform: rotate($degrees);
      -ms-transform: rotate($degrees); // IE9 only
       -o-transform: rotate($degrees);
          transform: rotate($degrees);
}
@mixin rotateX($degrees) {
  -webkit-transform: rotateX($degrees);
      -ms-transform: rotateX($degrees); // IE9 only
       -o-transform: rotateX($degrees);
          transform: rotateX($degrees);
}
@mixin rotateY($degrees) {
  -webkit-transform: rotateY($degrees);
      -ms-transform: rotateY($degrees); // IE9 only
       -o-transform: rotateY($degrees);
          transform: rotateY($degrees);
}
@mixin perspective($perspective) {
  -webkit-perspective: $perspective;
     -moz-perspective: $perspective;
          perspective: $perspective;
}
@mixin perspective-origin($perspective) {
  -webkit-perspective-origin: $perspective;
     -moz-perspective-origin: $perspective;
          perspective-origin: $perspective;
}
@mixin transform-origin($origin) {
  -webkit-transform-origin: $origin;
     -moz-transform-origin: $origin;
      -ms-transform-origin: $origin; // IE9 only
          transform-origin: $origin;
}


// Transitions

@mixin transition($transition...) {
  -webkit-transition: $transition;
       -o-transition: $transition;
          transition: $transition;
}
@mixin transition-property($transition-property...) {
  -webkit-transition-property: $transition-property;
          transition-property: $transition-property;
}
@mixin transition-delay($transition-delay) {
  -webkit-transition-delay: $transition-delay;
          transition-delay: $transition-delay;
}
@mixin transition-duration($transition-duration...) {
  -webkit-transition-duration: $transition-duration;
          transition-duration: $transition-duration;
}
@mixin transition-timing-function($timing-function) {
  -webkit-transition-timing-function: $timing-function;
          transition-timing-function: $timing-function;
}
@mixin transition-transform($transition...) {
  -webkit-transition: -webkit-transform $transition;
     -moz-transition: -moz-transform $transition;
       -o-transition: -o-transform $transition;
          transition: transform $transition;
}


// User select
// For selecting text on the page

@mixin user-select($select) {
  -webkit-user-select: $select;
     -moz-user-select: $select;
      -ms-user-select: $select; // IE10+
          user-select: $select;
}

// Components
// Alerts

@mixin alert-variant($background, $border, $text-color) {
  background-color: $background;
  border-color: $border;
  color: $text-color;

  hr {
    border-top-color: darken($border, 5%);
  }
  .alert-link {
    color: darken($text-color, 10%);
  }
}

// Button variants
//
// Easily pump out default styles, as well as :hover, :focus, :active,
// and disabled options for all buttons

@mixin button-variant($color, $background, $border) {
  color: $color;
  background-color: $background;
  border-color: $border;

  &:focus,
  &.focus {
    color: $color;
    background-color: darken($background, 10%);
        border-color: darken($border, 25%);
  }
  &:hover {
    color: $color;
    background-color: darken($background, 10%);
        border-color: darken($border, 12%);
  }
  &:active,
  &.active,
  .open > &.dropdown-toggle {
    color: $color;
    background-color: darken($background, 10%);
        border-color: darken($border, 12%);

    &:hover,
    &:focus,
    &.focus {
      color: $color;
      background-color: darken($background, 17%);
          border-color: darken($border, 25%);
    }
  }
  &:active,
  &.active,
  .open > &.dropdown-toggle {
    background-image: none;
  }
  &.disabled,
  &[disabled],
  fieldset[disabled] & {
    &:hover,
    &:focus,
    &.focus {
      background-color: $background;
          border-color: $border;
    }
  }

  .badge {
    color: $background;
    background-color: $color;
  }
}

// Button sizes
@mixin button-size($padding-vertical, $padding-horizontal, $font-size, $line-height, $border-radius) {
  padding: $padding-vertical $padding-horizontal;
  font-size: $font-size;
  line-height: $line-height;
  border-radius: $border-radius;
}

// Panels

@mixin panel-variant($border, $heading-text-color, $heading-bg-color, $heading-border) {
  border-color: $border;

  & > .panel-heading {
    color: $heading-text-color;
    background-color: $heading-bg-color;
    border-color: $heading-border;

    + .panel-collapse > .panel-body {
      border-top-color: $border;
    }
    .badge {
      color: $heading-bg-color;
      background-color: $heading-text-color;
    }
  }
  & > .panel-footer {
    + .panel-collapse > .panel-body {
      border-bottom-color: $border;
    }
  }
}

// Pagination

@mixin pagination-size($padding-vertical, $padding-horizontal, $font-size, $line-height, $border-radius) {
  > li {
    > a,
    > span {
      padding: $padding-vertical $padding-horizontal;
      font-size: $font-size;
      line-height: $line-height;
    }
    &:first-child {
      > a,
      > span {
        @include border-left-radius($border-radius);
      }
    }
    &:last-child {
      > a,
      > span {
        @include border-right-radius($border-radius);
      }
    }
  }
}

// List Groups

@mixin list-group-item-variant($state, $background, $color) {
  .list-group-item-#{$state} {
    color: $color;
    background-color: $background;

    // [converter] extracted a&, button& to a.list-group-item-#{$state}, button.list-group-item-#{$state}
  }

  a.list-group-item-#{$state},
  button.list-group-item-#{$state} {
    color: $color;

    .list-group-item-heading {
      color: inherit;
    }

    &:hover,
    &:focus {
      color: $color;
      background-color: darken($background, 5%);
    }
    &.active,
    &.active:hover,
    &.active:focus {
      color: #fff;
      background-color: $color;
      border-color: $color;
    }
  }
}

// Horizontal dividers
//
// Dividers (basically an hr) within dropdowns and nav lists

@mixin nav-divider($color: #e5e5e5) {
  height: 1px;
  margin: (($line-height-computed / 2) - 1) 0;
  overflow: hidden;
  background-color: $color;
}

// Form validation states
//
// Used in forms.less to generate the form validation CSS for warnings, errors,
// and successes.

@mixin form-control-validation($text-color: #555, $border-color: #ccc, $background-color: #f5f5f5) {
  // Color the label and help text
  .help-block,
  .control-label,
  .radio,
  .checkbox,
  .radio-inline,
  .checkbox-inline,
  &.radio label,
  &.checkbox label,
  &.radio-inline label,
  &.checkbox-inline label  {
    color: $text-color;
  }
  // Set the border and box shadow on specific inputs to match
  .form-control {
    border-color: $border-color;
    @include box-shadow(inset 0 1px 1px rgba(0,0,0,.075)); // Redeclare so transitions work
    &:focus {
      border-color: darken($border-color, 10%);
      $shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 6px lighten($border-color, 20%);
      @include box-shadow($shadow);
    }
  }
  // Set validation states also for addons
  .input-group-addon {
    color: $text-color;
    border-color: $border-color;
    background-color: $background-color;
  }
  // Optional feedback icon
  .form-control-feedback {
    color: $text-color;
  }
}


// Form control focus state
//
// Generate a customized focus state and for any input with the specified color,
// which defaults to the `$input-border-focus` variable.
//
// We highly encourage you to not customize the default value, but instead use
// this to tweak colors on an as-needed basis. This aesthetic change is based on
// WebKit's default styles, but applicable to a wider range of browsers. Its
// usability and accessibility should be taken into account with any change.
//
// Example usage: change the default blue border and shadow to white for better
// contrast against a dark gray background.
@mixin form-control-focus($color: $input-border-focus) {
  $color-rgba: rgba(red($color), green($color), blue($color), .6);
  &:focus {
    border-color: $color;
    outline: 0;
    @include box-shadow(inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px $color-rgba);
  }
}

// Form control sizing
//
// Relative text size, padding, and border-radii changes for form controls. For
// horizontal sizing, wrap controls in the predefined grid classes. `<select>`
// element gets special love because it's special, and that's a fact!
// [converter] $parent hack
@mixin input-size($parent, $input-height, $padding-vertical, $padding-horizontal, $font-size, $line-height, $border-radius) {
  #{$parent} {
    height: $input-height;
    padding: $padding-vertical $padding-horizontal;
    font-size: $font-size;
    line-height: $line-height;
    border-radius: $border-radius;
  }

  select#{$parent} {
    height: $input-height;
    line-height: $input-height;
  }

  textarea#{$parent},
  select[multiple]#{$parent} {
    height: auto;
  }
}

// Progress bars

@mixin progress-bar-variant($color) {
  background-color: $color;

  // Deprecated parent class requirement as of v3.2.0
  .progress-striped & {
    @include gradient-striped;
  }
}

// Tables

@mixin table-row-variant($state, $background) {
  // Exact selectors below required to override `.table-striped` and prevent
  // inheritance to nested tables.
  .table > thead > tr,
  .table > tbody > tr,
  .table > tfoot > tr {
    > td.#{$state},
    > th.#{$state},
    &.#{$state} > td,
    &.#{$state} > th {
      background-color: $background;
    }
  }

  // Hover states for `.table-hover`
  // Note: this is not available for cells or rows within `thead` or `tfoot`.
  .table-hover > tbody > tr {
    > td.#{$state}:hover,
    > th.#{$state}:hover,
    &.#{$state}:hover > td,
    &:hover > .#{$state},
    &.#{$state}:hover > th {
      background-color: darken($background, 5%);
    }
  }
}

// Skins
// Contextual backgrounds

// [converter] $parent hack
@mixin bg-variant($parent, $color) {
  #{$parent} {
    background-color: $color;
  }
  a#{$parent}:hover,
  a#{$parent}:focus {
    background-color: darken($color, 10%);
  }
}

// Single side border-radius

@mixin border-top-radius($radius) {
  border-top-right-radius: $radius;
   border-top-left-radius: $radius;
}
@mixin border-right-radius($radius) {
  border-bottom-right-radius: $radius;
     border-top-right-radius: $radius;
}
@mixin border-bottom-radius($radius) {
  border-bottom-right-radius: $radius;
   border-bottom-left-radius: $radius;
}
@mixin border-left-radius($radius) {
  border-bottom-left-radius: $radius;
     border-top-left-radius: $radius;
}

// Gradients



// Horizontal gradient, from left to right
//
// Creates two color stops, start and end, by specifying a color and position for each color stop.
// Color stops are not available in IE9 and below.
@mixin gradient-horizontal($start-color: #555, $end-color: #333, $start-percent: 0%, $end-percent: 100%) {
  background-image: -webkit-linear-gradient(left, $start-color $start-percent, $end-color $end-percent); // Safari 5.1-6, Chrome 10+
  background-image: -o-linear-gradient(left, $start-color $start-percent, $end-color $end-percent); // Opera 12
  background-image: linear-gradient(to right, $start-color $start-percent, $end-color $end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+
  background-repeat: repeat-x;
  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{ie-hex-str($start-color)}', endColorstr='#{ie-hex-str($end-color)}', GradientType=1); // IE9 and down
}

// Vertical gradient, from top to bottom
//
// Creates two color stops, start and end, by specifying a color and position for each color stop.
// Color stops are not available in IE9 and below.
@mixin gradient-vertical($start-color: #555, $end-color: #333, $start-percent: 0%, $end-percent: 100%) {
  background-image: -webkit-linear-gradient(top, $start-color $start-percent, $end-color $end-percent);  // Safari 5.1-6, Chrome 10+
  background-image: -o-linear-gradient(top, $start-color $start-percent, $end-color $end-percent);  // Opera 12
  background-image: linear-gradient(to bottom, $start-color $start-percent, $end-color $end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+
  background-repeat: repeat-x;
  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{ie-hex-str($start-color)}', endColorstr='#{ie-hex-str($end-color)}', GradientType=0); // IE9 and down
}

@mixin gradient-directional($start-color: #555, $end-color: #333, $deg: 45deg) {
  background-repeat: repeat-x;
  background-image: -webkit-linear-gradient($deg, $start-color, $end-color); // Safari 5.1-6, Chrome 10+
  background-image: -o-linear-gradient($deg, $start-color, $end-color); // Opera 12
  background-image: linear-gradient($deg, $start-color, $end-color); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+
}
@mixin gradient-horizontal-three-colors($start-color: #00b3ee, $mid-color: #7a43b6, $color-stop: 50%, $end-color: #c3325f) {
  background-image: -webkit-linear-gradient(left, $start-color, $mid-color $color-stop, $end-color);
  background-image: -o-linear-gradient(left, $start-color, $mid-color $color-stop, $end-color);
  background-image: linear-gradient(to right, $start-color, $mid-color $color-stop, $end-color);
  background-repeat: no-repeat;
  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{ie-hex-str($start-color)}', endColorstr='#{ie-hex-str($end-color)}', GradientType=1); // IE9 and down, gets no color-stop at all for proper fallback
}
@mixin gradient-vertical-three-colors($start-color: #00b3ee, $mid-color: #7a43b6, $color-stop: 50%, $end-color: #c3325f) {
  background-image: -webkit-linear-gradient($start-color, $mid-color $color-stop, $end-color);
  background-image: -o-linear-gradient($start-color, $mid-color $color-stop, $end-color);
  background-image: linear-gradient($start-color, $mid-color $color-stop, $end-color);
  background-repeat: no-repeat;
  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{ie-hex-str($start-color)}', endColorstr='#{ie-hex-str($end-color)}', GradientType=0); // IE9 and down, gets no color-stop at all for proper fallback
}
@mixin gradient-radial($inner-color: #555, $outer-color: #333) {
  background-image: -webkit-radial-gradient(circle, $inner-color, $outer-color);
  background-image: radial-gradient(circle, $inner-color, $outer-color);
  background-repeat: no-repeat;
}
@mixin gradient-striped($color: rgba(255,255,255,.15), $angle: 45deg) {
  background-image: -webkit-linear-gradient($angle, $color 25%, transparent 25%, transparent 50%, $color 50%, $color 75%, transparent 75%, transparent);
  background-image: -o-linear-gradient($angle, $color 25%, transparent 25%, transparent 50%, $color 50%, $color 75%, transparent 75%, transparent);
  background-image: linear-gradient($angle, $color 25%, transparent 25%, transparent 50%, $color 50%, $color 75%, transparent 75%, transparent);
}

// Layout
// Clearfix
//
// For modern browsers
// 1. The space content is one way to avoid an Opera bug when the
//    contenteditable attribute is included anywhere else in the document.
//    Otherwise it causes space to appear at the top and bottom of elements
//    that are clearfixed.
// 2. The use of `table` rather than `block` is only necessary if using
//    `:before` to contain the top-margins of child elements.
//
// Source: http://nicolasgallagher.com/micro-clearfix-hack/

@mixin clearfix() {
  &:before,
  &:after {
    content: " "; // 1
    display: table; // 2
  }
  &:after {
    clear: both;
  }
}

// Center-align a block level element

@mixin center-block() {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

// Navbar vertical align
//
// Vertically center elements in the navbar.
// Example: an element has a height of 30px, so write out `.navbar-vertical-align(30px);` to calculate the appropriate top margin.

@mixin navbar-vertical-align($element-height) {
  margin-top: (($navbar-height - $element-height) / 2);
  margin-bottom: (($navbar-height - $element-height) / 2);
}

// Framework grid generation
//
// Used only by Bootstrap to generate the correct number of grid classes given
// any value of `$grid-columns`.

// [converter] This is defined recursively in LESS, but Sass supports real loops
@mixin make-grid-columns($i: 1, $list: ".col-xs-#{$i}, .col-sm-#{$i}, .col-md-#{$i}, .col-lg-#{$i}") {
  @for $i from (1 + 1) through $grid-columns {
    $list: "#{$list}, .col-xs-#{$i}, .col-sm-#{$i}, .col-md-#{$i}, .col-lg-#{$i}";
  }
  #{$list} {
    position: relative;
    // Prevent columns from collapsing when empty
    min-height: 1px;
    // Inner gutter via padding
    padding-left:  ceil(($grid-gutter-width / 2));
    padding-right: floor(($grid-gutter-width / 2));
  }
}


// [converter] This is defined recursively in LESS, but Sass supports real loops
@mixin float-grid-columns($class, $i: 1, $list: ".col-#{$class}-#{$i}") {
  @for $i from (1 + 1) through $grid-columns {
    $list: "#{$list}, .col-#{$class}-#{$i}";
  }
  #{$list} {
    float: left;
  }
}


@mixin calc-grid-column($index, $class, $type) {
  @if ($type == width) and ($index > 0) {
    .col-#{$class}-#{$index} {
      width: percentage(($index / $grid-columns));
    }
  }
  @if ($type == push) and ($index > 0) {
    .col-#{$class}-push-#{$index} {
      left: percentage(($index / $grid-columns));
    }
  }
  @if ($type == push) and ($index == 0) {
    .col-#{$class}-push-0 {
      left: auto;
    }
  }
  @if ($type == pull) and ($index > 0) {
    .col-#{$class}-pull-#{$index} {
      right: percentage(($index / $grid-columns));
    }
  }
  @if ($type == pull) and ($index == 0) {
    .col-#{$class}-pull-0 {
      right: auto;
    }
  }
  @if ($type == offset) {
    .col-#{$class}-offset-#{$index} {
      margin-left: percentage(($index / $grid-columns));
    }
  }
}

// [converter] This is defined recursively in LESS, but Sass supports real loops
@mixin loop-grid-columns($columns, $class, $type) {
  @for $i from 0 through $columns {
    @include calc-grid-column($i, $class, $type);
  }
}


// Create grid for specific class
@mixin make-grid($class) {
  @include float-grid-columns($class);
  @include loop-grid-columns($grid-columns, $class, width);
  @include loop-grid-columns($grid-columns, $class, pull);
  @include loop-grid-columns($grid-columns, $class, push);
  @include loop-grid-columns($grid-columns, $class, offset);
}

// Grid system
//
// Generate semantic grid columns with these mixins.

// Centered container element
@mixin container-fixed($gutter: $grid-gutter-width) {
  margin-right: auto;
  margin-left: auto;
  padding-left:  floor(($gutter / 2));
  padding-right: ceil(($gutter / 2));
  @include clearfix;
}

// Creates a wrapper for a series of columns
@mixin make-row($gutter: $grid-gutter-width) {
  margin-left:  ceil(($gutter / -2));
  margin-right: floor(($gutter / -2));
  @include clearfix;
}

// Generate the extra small columns
@mixin make-xs-column($columns, $gutter: $grid-gutter-width) {
  position: relative;
  float: left;
  width: percentage(($columns / $grid-columns));
  min-height: 1px;
  padding-left:  ($gutter / 2);
  padding-right: ($gutter / 2);
}
@mixin make-xs-column-offset($columns) {
  margin-left: percentage(($columns / $grid-columns));
}
@mixin make-xs-column-push($columns) {
  left: percentage(($columns / $grid-columns));
}
@mixin make-xs-column-pull($columns) {
  right: percentage(($columns / $grid-columns));
}

// Generate the small columns
@mixin make-sm-column($columns, $gutter: $grid-gutter-width) {
  position: relative;
  min-height: 1px;
  padding-left:  ($gutter / 2);
  padding-right: ($gutter / 2);

  @media (min-width: $screen-sm-min) {
    float: left;
    width: percentage(($columns / $grid-columns));
  }
}
@mixin make-sm-column-offset($columns) {
  @media (min-width: $screen-sm-min) {
    margin-left: percentage(($columns / $grid-columns));
  }
}
@mixin make-sm-column-push($columns) {
  @media (min-width: $screen-sm-min) {
    left: percentage(($columns / $grid-columns));
  }
}
@mixin make-sm-column-pull($columns) {
  @media (min-width: $screen-sm-min) {
    right: percentage(($columns / $grid-columns));
  }
}

// Generate the medium columns
@mixin make-md-column($columns, $gutter: $grid-gutter-width) {
  position: relative;
  min-height: 1px;
  padding-left:  ($gutter / 2);
  padding-right: ($gutter / 2);

  @media (min-width: $screen-md-min) {
    float: left;
    width: percentage(($columns / $grid-columns));
  }
}
@mixin make-md-column-offset($columns) {
  @media (min-width: $screen-md-min) {
    margin-left: percentage(($columns / $grid-columns));
  }
}
@mixin make-md-column-push($columns) {
  @media (min-width: $screen-md-min) {
    left: percentage(($columns / $grid-columns));
  }
}
@mixin make-md-column-pull($columns) {
  @media (min-width: $screen-md-min) {
    right: percentage(($columns / $grid-columns));
  }
}

// Generate the large columns
@mixin make-lg-column($columns, $gutter: $grid-gutter-width) {
  position: relative;
  min-height: 1px;
  padding-left:  ($gutter / 2);
  padding-right: ($gutter / 2);

  @media (min-width: $screen-lg-min) {
    float: left;
    width: percentage(($columns / $grid-columns));
  }
}
@mixin make-lg-column-offset($columns) {
  @media (min-width: $screen-lg-min) {
    margin-left: percentage(($columns / $grid-columns));
  }
}
@mixin make-lg-column-push($columns) {
  @media (min-width: $screen-lg-min) {
    left: percentage(($columns / $grid-columns));
  }
}
@mixin make-lg-column-pull($columns) {
  @media (min-width: $screen-lg-min) {
    right: percentage(($columns / $grid-columns));
  }
}

@mixin contained_background( $url: none, $color: transparent ) {
  @if $url != none {
    $url: url($url);
  }

  background: $color $url no-repeat 50% 50%;
  background-size: contain;
}

@mixin bg-icon( $path, $ext: "png" ) {
  $url: $path + "." + $ext;
  $url2x: $path + "-2x." + $ext;

  @include covered_background($url);
  @include image-set(
      url($url) 1x,
      url($url2x) 2x
  );
}

@mixin bg-icon-contained( $path, $ext: "png" ) {
  $url: $path + "." + $ext;
  $url2x: $path + "-2x." + $ext;

  @include contained_background($url);
  @include image-set(
      url($url) 1x,
      url($url2x) 2x
  );
}



@mixin header-brand-logo {
  position: relative;
  font: {
    size: $layout-brand-font-size;
    weight: $layout-brand-font-weight;
  }
  line-height: 1.1;
  @include text-middle("img, span");

  img {
    width: 256px / 50px * $layout-brand-image-height;
    height: $layout-brand-image-height;
    max-height: 100%;

    + span {
      position: relative;
      padding-left: $layout-brand-separator-gap;

      &:before {
        content: $UN-space;
        width: 1px;
        background-color: $layout-brand-separator-color;
        @include stretch(0, auto, 0, 10px);
      }
    }
  }

  span {
    padding-left: 10px;
    color: $layout-brand-text-color;
  }
}

@mixin sidebar-menu-label {
  margin-bottom: 5px;
  line-height: 20px;
  font-size: 12px;
  color: #999;

  &,
  span {
    position: relative;
  }

  span {
    z-index: 1;
    margin-left: 15px;
    padding: 0 5px;
    text-shadow: 1px 1px 3px #fff;
    background-color: #eee;
  }

  &:before {
    content: $UN-space;
    position: absolute;
    top: 50%;
    right: 0;
    left: 0;
    height: 1px;
    background-color: #ddd;
  }
}

@mixin sidebar-menu-iconic {
  $menuGap: 25px;

  padding: 0 $menuGap;
  @include text-middle("> .fa, > .fa + span");

  > .fa {
    $iconWidth: (18 / 14);      // 与 Font Awesome 的 .fa-fw 相同
    $iconFontSize: 16px;

    width: #{$iconWidth}em;
    font-size: $iconFontSize;
    text-align: center;

    + span {
      $menuTextGap: 14px;

      max-width: ($layout-sidebar-width - $menuGap * 2 - $iconWidth * $iconFontSize - $menuTextGap);
      margin-left: $menuTextGap;
      @include ellipsis;
    }
  }
}

@mixin sidebar-menu-primary {
  position: relative;
  height: 48px;
  font-weight: normal;
  @include sidebar-menu-iconic;
}

@mixin sidebar-menu-secondary {
  $subHeight: 22px;
  $subGap: (36px - $subHeight) / 2;

  padding: $subGap 10px $subGap 59px;
  line-height: $subHeight;
  @include line_feed;
}



@mixin header-brand-logo-in-mobile {
  img {
    position: absolute;
    top: ($layout-header-height - $layout-brand-image-height) / 2;
    left: 0;
    max-width: none;
    max-height: none;
    clip: rect(0px, 34px, 24px, 0px);

    + span {
      margin-left: 30px;
    }
  }
}

@mixin sidebar-in-mobile( $target: "" ) {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 999999999;
  display: none;
  float: none;
  width: auto;
  padding: 0;
  background-color: rgba(0, 0, 0, .4);

  @if $target != "" {
    #{$target} {
      width: $layout-sidebar-width;
      height: 100%;
      padding: {
        top: $layout-sidebar-top-padding;
        bottom: $layout-sidebar-bottom-padding;
      }
      overflow: auto;
      background-color: #eee;
    }
  }

  &.is-shown {
    display: block;
  }
}
