Sha256: 1c237fdf2c68754b9ee4715931b8699266e7c17ca28582d94c15dca6a5eca0b0
Contents?: true
Size: 1.06 KB
Versions: 5
Compression:
Stored size: 1.06 KB
Contents
// 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)); } } } @if $singularity-debug { @debug "Grid compounded to #{length($list)} columns"; } @return $list; }
Version data entries
5 entries across 5 versions & 1 rubygems