Sha256: edc797aac3bbd557621fe6b3719607aa890e015678ef5fa6982eb81b52e5c1af

Contents?: true

Size: 592 Bytes

Versions: 4

Compression:

Stored size: 592 Bytes

Contents

// Creates a list based on a ratio
// Valid options for $start: 'large' or 'small'
@function ratio($ratio, $steps, $start: 'small') {
  $return: ();

  @for $i from 1 through $steps {
    @if function-exists(pow) {
      $return: append($return, pow($ratio, $i));
    }
    @else {
      $x: $ratio;
      @for $i from 2 through $i {
        $x: $x * $ratio;
      }
      $return: append($return, $x);
    }
  }

  @if $start == 'small' and $ratio < 1 {
    $return: reverse($return);
  }
  @else if $start == 'large' and $ratio > 1 {
    $return: reverse($return);
  }

  @return $return;
}

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
singularity-extras-1.0.0 stylesheets/singularity-extras/generators/_ratio.scss
singularity-extras-1.0.0.alpha.3 stylesheets/singularity-extras/generators/_ratio.scss
singularity-extras-1.0.0.alpha.2 stylesheets/singularity-extras/generators/_ratio.scss
singularity-extras-1.0.0.alpha.1 stylesheets/singularity-extras/generators/_ratio.scss