SU-SWS/decanter

View on GitHub
core/src/scss/utilities/mixins/grid/_ie-autorow.scss

Summary

Maintainability
Test Coverage

///
/// Mixin to generate ms-ie compatible 'auto flow' settings. In IE 11 you have to
/// specifically tell the browser what row and column each cell is in. This
/// allows you to do that with some asumptions.
///
/// @name ie-autorow
///
/// @param {integer} $children [4] - number of children in order for row;
///
/// @group mixin
@mixin ie-autorow($children: 2) {
  @for $i from 1 through $children {
    > *:nth-child(#{$i}) {
      -ms-grid-row: $i;
    }
  }
}