// Alignment utilities
// Mixin take size in parameter
// @see _breakpoints.scss
// Every class are generated with breakpoints prefix
@mixin mic-alignment-utilities($size: '') {
  // Justify Content
  $justify-content-properties: (
    'justify-start': 'flex-start',
    'justify-end': 'flex-end',
    'justify-center': 'center',
    'justify-between': 'space-between',
    'justify-around': 'space-around'
  );
  @each $class, $property in $justify-content-properties {
    .#{$size + $class} {
      -webkit-justify-content: #{$property};
      -moz-justify-content: #{$property};
      -ms-justify-content: #{$property};
      justify-content: #{$property};
    }
  }

  // Justify Items
  $justify-items-properties: (
    'justify-items-start': 'start',
    'justify-items-end': 'end',
    'justify-items-center': 'center',
    'justify-items-stretch': 'stretch'
  );
  @each $class, $property in $justify-items-properties {
    .#{$size + $class} {
      -webkit-justify-items: #{$property};
      -moz-justify-items: #{$property};
      -ms-justify-items: #{$property};
      justify-items: #{$property};
    }
  }

  // Justify self
  $justify-self-properties: (
    'justify-self-auto': 'auto',
    'justify-self-start': 'start',
    'justify-self-end': 'end',
    'justify-self-center': 'center',
    'justify-self-baseline': 'baseline',
    'justify-self-stretch': 'stretch'
  );
  @each $class, $property in $justify-self-properties {
    .#{$size + $class} {
      -webkit-justify-self: #{$property};
      -moz-justify-self: #{$property};
      -ms-justify-self: #{$property};
      justify-self: #{$property};
    }
  }

  // Align Content
  $align-content-properties: (
    'content-start': 'flex-start',
    'content-end': 'flex-end',
    'content-center': 'center',
    'content-between': 'space-between',
    'content-around': 'space-around',
    'content-evenly': 'space-evenly',
    'content-baseline': 'baseline'
  );
  @each $class, $property in $align-content-properties {
    .#{$size + $class} {
      -webkit-align-content: #{$property};
      -moz-align-content: #{$property};
      -ms-align-content: #{$property};
      align-content: #{$property};
    }
  }

  // Align Items
  // Classes: items-start, items-end, items-center, items-baseline, items-stretch
  $align-items-properties: (
    'items-start': 'flex-start',
    'items-end': 'flex-end',
    'items-center': 'center',
    'items-baseline': 'baseline',
    'items-stretch': 'stretch'
  );
  @each $class, $property in $align-items-properties {
    .#{$size + $class} {
      -webkit-align-items: #{$property};
      -moz-align-items: #{$property};
      -ms-align-items: #{$property};
      align-items: #{$property};
    }
  }

  // Align self
  // Classes: self-auto, self-start, self-end, self-center, self-baseline, self-stretch
  $align-self-properties: (
    'self-auto': 'auto',
    'self-start': 'flex-start',
    'self-end': 'flex-end',
    'self-center': 'center',
    'self-baseline': 'baseline',
    'self-stretch': 'stretch'
  );
  @each $class, $property in $align-self-properties {
    .#{$size + $class} {
      -webkit-align-self: #{$property};
      -moz-align-self: #{$property};
      -ms-align-self: #{$property};
      align-self: #{$property};
    }
  }

  // Place Content
  $place-content-properties: (
    'place-content-start': 'start',
    'place-content-end': 'end',
    'place-content-center': 'center',
    'place-content-between': 'space-between',
    'place-content-around': 'space-around',
    'place-content-evenly': 'space-evenly',
    'place-content-stretch': 'stretch',
    'place-content-baseline': 'baseline'
  );
  @each $class, $property in $place-content-properties {
    .#{$size + $class} {
      -webkit-place-content: #{$property};
      -moz-place-content: #{$property};
      -ms-place-content: #{$property};
      place-content: #{$property};
    }
  }

  // place Items
  $place-items-properties: (
    'place-items-start': 'start',
    'place-items-end': 'end',
    'place-items-center': 'center',
    'place-items-baseline': 'baseline',
    'place-items-stretch': 'stretch'
  );
  @each $class, $property in $place-items-properties {
    .#{$size + $class} {
      -webkit-place-items: #{$property};
      -moz-place-items: #{$property};
      -ms-place-items: #{$property};
      place-items: #{$property};
    }
  }

  // Place self
  $place-self-properties: (
    'place-self-auto': 'auto',
    'place-self-start': 'flex-start',
    'place-self-end': 'flex-end',
    'place-self-center': 'center',
    'place-self-stretch': 'stretch'
  );
  @each $class, $property in $place-self-properties {
    .#{$size + $class} {
      -webkit-place-self: #{$property};
      -moz-place-self: #{$property};
      -ms-place-self: #{$property};
      place-self: #{$property};
    }
  }
}
