Sha256: 7e0b766536eadebee7ee5e6230cbd5c168a4580011d78d2c9ea1a072378e4940

Contents?: true

Size: 580 Bytes

Versions: 2

Compression:

Stored size: 580 Bytes

Contents

@charset "UTF-8";
/// Parse a column count like `3 of 5` and retur the total coloumn count.
/// This is to allow a shorthand for custom grids without using a settings map.
///
///
/// @argument {list} $span
///
/// @return {number}
///
/// @example scss
///   _neat-parse-columns(3 of 5)
///
/// @access private

@function _neat-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`";
  }
}

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
neat-4.0.0 core/neat/functions/_neat-parse-columns.scss
neat-3.0.1 core/neat/functions/_neat-parse-columns.scss