@charset "UTF-8";

///
/// Parse a column count like `3 of 5` and return the total column count.
/// This is to allow a shorthand for custom grids without using a settings map.
///
/// @name flex-parse-columns
///
/// @param {List} $span - something like `2 of 12`
///
/// @group mixin
@function flex-parse-columns($span) {
  @if length($span) == 3 {
    $_total-columns: nth($span, 3);
    @return $_total-columns;
  }
  @else if (length($span) == 2) or (length($span) >= 3) {
    @error "`$column` should contain 2 values, seperated by an `of`";
  }
}
