Sha256: 458a3cc51e3e23cd7bf7c34c79607e85550bfdba2c73102f9503a7320bf11677

Contents?: true

Size: 1.23 KB

Versions: 24

Compression:

Stored size: 1.23 KB

Contents

// Math Validation
// ===============


// Valid Columns
// -------------
// Check that a column setting is valid.
@function valid-columns(
  $columns,
  $silent: false
) {
  $type: type-of($columns);
  $return: null;

  @if $type == number and unitless($columns) {
    $return: $columns;
  } @else if $type == list {
    $fail: null;
    @each $col in $columns {
      @if type-of($col) == number {
        $fail: $fail or if(unitless($col), null, true);
      } @else {
        $fail: true;
      }
    }
    $return: if($fail, $return, $columns);
  }

  @if $return != $columns and not($silent) {
    $return: null;
    $warn: '$columns must be a unitless number or list of unitless numbers.';
    @warn $warn + ' Current value [#{$type}]: #{$columns}';
  }

  @return $return;
}


// Valid Gutters
// -------------
// Check that a gutter setting is valid.
@function valid-gutters(
  $gutters,
  $silent: false
) {
  $type: type-of($gutters);
  $return: null;

  @if $type == number and unitless($gutters) {
    $return: $gutters;
  } @else if not($silent) {
    $warn: '$gutters must be a unitless number.';
    @warn $warn + ' Current value [#{$type}]: #{$gutters}';
  }

  @return $return;
}

Version data entries

24 entries across 24 versions & 3 rubygems

Version Path
jekyll-theme-basically-basic-1.1.3 _sass/basically-basic/vendor/susy/su/_validation.scss
jekyll-theme-basically-basic-1.1.2 _sass/basically-basic/vendor/susy/su/_validation.scss
jekyll-theme-basically-basic-1.1.1 _sass/basically-basic/vendor/susy/su/_validation.scss
minimal-mistakes-jekyll-4.4.2 _sass/minimal-mistakes/vendor/susy/susy/su/_validation.scss
minimal-mistakes-jekyll-4.4.0 _sass/minimal-mistakes/vendor/susy/susy/su/_validation.scss
sparrow-jekyll-theme-0.1.1 _sass/vendor/susy/susy/su/_validation.scss
sparrow-jekyll-theme-0.1.0 _sass/vendor/susy/susy/su/_validation.scss
jekyll-theme-basically-basic-1.1.0 _sass/basically-basic/vendor/susy/su/_validation.scss
jekyll-theme-basically-basic-1.0.1 _sass/basically-basic/vendor/susy/su/_validation.scss
minimal-mistakes-jekyll-4.3.1 _sass/vendor/susy/susy/su/_validation.scss
minimal-mistakes-jekyll-4.3.0 _sass/vendor/susy/susy/su/_validation.scss
minimal-mistakes-jekyll-4.2.2 _sass/vendor/susy/susy/su/_validation.scss
minimal-mistakes-jekyll-4.2.1 _sass/vendor/susy/susy/su/_validation.scss
minimal-mistakes-jekyll-4.2.0 _sass/vendor/susy/susy/su/_validation.scss
minimal-mistakes-jekyll-4.1.0 _sass/vendor/susy/susy/su/_validation.scss
minimal-mistakes-jekyll-4.0.10 _sass/vendor/susy/susy/su/_validation.scss
minimal-mistakes-jekyll-4.0.9 _sass/vendor/susy/susy/su/_validation.scss
minimal-mistakes-jekyll-4.0.8 _sass/vendor/susy/susy/su/_validation.scss
minimal-mistakes-jekyll-4.0.7 _sass/vendor/susy/susy/su/_validation.scss
minimal-mistakes-jekyll-4.0.6 _sass/vendor/susy/susy/su/_validation.scss