Sha256: 78fa0293416acfff4207d1f4cf3691cabee34656510bef975a65fc2cdc57b854

Contents?: true

Size: 1.17 KB

Versions: 54

Compression:

Stored size: 1.17 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

54 entries across 54 versions & 2 rubygems

Version Path
wrgem-0.0.55 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/math/su/_validation.scss
wrgem-0.0.54 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/math/su/_validation.scss
wrgem-0.0.53 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/math/su/_validation.scss
wrgem-0.0.52 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/math/su/_validation.scss
wrgem-0.0.51 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/math/su/_validation.scss
wrgem-0.0.50 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/math/su/_validation.scss
wrgem-0.0.49 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/math/su/_validation.scss
wrgem-0.0.48 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/math/su/_validation.scss
wrgem-0.0.47 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/math/su/_validation.scss
wrgem-0.0.46 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/math/su/_validation.scss
wrgem-0.0.45 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/math/su/_validation.scss
wrgem-0.0.44 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/math/su/_validation.scss
wrgem-0.0.43 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/math/su/_validation.scss
wrgem-0.0.42 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/math/su/_validation.scss
wrgem-0.0.41 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/math/su/_validation.scss
wrgem-0.0.40 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/math/su/_validation.scss
wrgem-0.0.39 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/math/su/_validation.scss
wrgem-0.0.38 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/math/su/_validation.scss
wrgem-0.0.37 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/math/su/_validation.scss
wrgem-0.0.35 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/math/su/_validation.scss