// Grid utilities
// Mixin take size in parameter
// @see _breakpoints.scss
// Every class are generated with breakpoints prefix
@mixin mic-grid-utilities($size: '') {
  // Grid templates
  $grid-template-columns-properties: (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12);
  @each $i in $grid-template-columns-properties {
    .#{$size + 'grid-cols-' + $i} {
      grid-template-columns: repeat($i, minmax(0, 1fr));
    }
  }

  $grid-template-rows-properties: (0, 1, 2, 3, 4, 5, 6);
  @each $i in $grid-template-rows-properties {
    .#{$size + 'grid-rows-' + $i} {
      grid-template-rows: repeat($i, minmax(0, 1fr));
    }
  }

  // Grid span
  $grid-column-span-properties: (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12);
  @each $i in $grid-column-span-properties {
    .#{$size + 'col-span-' + $i} {
      grid-column: span $i / span $i;
    }
  }
  .#{$size + 'col-auto'} {
    grid-column: auto;
  }

  $grid-row-span-properties: (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12);
  @each $i in $grid-row-span-properties {
    .#{$size + 'row-span-' + $i} {
      grid-row: span $i / span $i;
    }
  }
  .#{$size + 'row-auto'} {
    grid-row: auto;
  }
}
