stylesheets/singularity-extras/generators/_ratio.scss in singularity-extras-0.0.3 vs stylesheets/singularity-extras/generators/_ratio.scss in singularity-extras-1.0.0.alpha.1

- old
+ new

@@ -1,13 +1,20 @@ // Creates a list based on a ratio // Valid options for $start: 'large' or 'small' @function ratio($ratio, $steps, $start: 'small') { - $x: 1; $return: (); - @for $i from 0 through $steps - 1 { - $xr: $x * pow($ratio, $i); - $return: append($return, $xr); + @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); } \ No newline at end of file