Sha256: 582392f2832fe528f450e9def162496e251a2d4c8d8f2917a98785b6c1e3be84
Contents?: true
Size: 1020 Bytes
Versions: 6
Compression:
Stored size: 1020 Bytes
Contents
@import "modular-scale"; // centralize spiral steps. @function ratio-spiral-i($i) { @return (($i * 2) + 1); } @function ratio-spiral($depth: 5, $ratio: golden(), $invert: false) { // write the middle most column, a little out of step from the other columns. $list: ms(ratio-spiral-i(-$depth) + 1, 100, $ratio); // flip the direction the order columns are written in. @if $invert == false { @for $i from -($depth - 1) to 0 { // if the number is even @if $i/2 == round($i/2) { // append after the list $list: append($list, ms(ratio-spiral-i($i), 100, $ratio)); } @else { // append before the list $list: append(ms(ratio-spiral-i($i), 100, $ratio), $list); } } } @else { @for $i from -($depth - 1) to 0 { @if $i/2 == round($i/2) { $list: append(ms(ratio-spiral-i($i), 100, $ratio), $list); } @else { $list: append($list, ms(ratio-spiral-i($i), 100, $ratio)); } } } @return $list; }
Version data entries
6 entries across 6 versions & 1 rubygems