/*
 * A modified version of @kevva solution https://github.com/csswizardry/inuit.css/issues/170#issuecomment-14859371
 * Letter spacing hack to remove the necessity of using empty HTML comments between columns.
 *
 */

@if $use-gridfix == true {
  .grid {
    letter-spacing: -1rem;
  }

  /* Opera hack */
  .opera:-o-prefocus,
  .grid {
    word-spacing: -1rem;
  }

  .grid__item {
    letter-spacing: normal;
    word-spacing: normal;
  }
}

/*
 * An implementation of flexbox which can be applied to the grid items
 *
 */

@media only screen and (min-width: $lap-start){
  .flex {
    display: -webkit-box;
    display: -moz-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-box-direction: normal;
    -moz-box-direction: normal;
    -webkit-box-orient: horizontal;
    -moz-box-orient: horizontal;
    -webkit-flex-direction: row;
    -ms-flex-direction: row;
    flex-direction: row;
    -webkit-flex-wrap: nowrap;
    -ms-flex-wrap: nowrap;
    flex-wrap: nowrap;
    -webkit-box-pack: start;
    -moz-box-pack: start;
    -webkit-justify-content: flex-start;
    -ms-flex-pack: start;
    justify-content: flex-start;
    -webkit-align-content: stretch;
    -ms-flex-line-pack: stretch;
    align-content: stretch;
    -webkit-box-align: start;
    -moz-box-align: start;
    -webkit-align-items: flex-start;
    -ms-flex-align: start;
    align-items: flex-start;
  }

  .flex__item {
    -webkit-box-ordinal-group: 1;
    -moz-box-ordinal-group: 1;
    -webkit-order: 0;
    -ms-flex-order: 0;
    order: 0;
    -webkit-box-flex: 0;
    -moz-box-flex: 0;
    -webkit-flex: 0 1 auto;
    -ms-flex: 0 1 auto;
    flex: 0 1 auto;
    -webkit-align-self: center;
    -ms-flex-item-align: center;
    align-self: center;
  }
}