Sha256: 0a0e969683f5d95e67233af58ba656963a124162b29b5f6b95237e42149779d4
Contents?: true
Size: 1.23 KB
Versions: 10
Compression:
Stored size: 1.23 KB
Contents
// Calculate from-to breakpoints // ------------------------------------------------------------------------------- // @dependence `map-fetch()` // @dependence `get-value()` // ------------------------------------------------------------------------------- // @param $n ["from | "to"] : how to calculate breakpoint // @param $key [Value] : key of breakpoint // @param $i [Value] : index of current breakpoint // ------------------------------------------------------------------------------- // @return [Value] @function calc-breakpoint($n, $key, $i) { @if get-value(settings, grid) == "fluid" { @if $n == "from" { @if $i == (length(map-fetch($flint, config)) - 1) { @return 0; } @else { @return (get-value(next-index($i), breakpoint) + 1); } } @else if $n == "to" { @return get-value($key, breakpoint); } } @else if get-value(settings, grid) == "fixed" { @if $n == "from" { @if $i == (length(map-fetch($flint, config)) - 1) { @return 0; } @else { @return get-value($key, breakpoint); } } @else if $n == "to" { @if steal-key($i) != steal-key(1) { @return (get-value(steal-key(($i - 1)), breakpoint) - 1); } @else { @return (get-value(steal-key($i), breakpoint) - 1); } } } }
Version data entries
10 entries across 10 versions & 1 rubygems