Sha256: 0f409a63788c5850988dfd09003f3667b7732538d5c0cb42196f406bbbb84139
Contents?: true
Size: 1.19 KB
Versions: 1
Compression:
Stored size: 1.19 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 is-lowest-breakpoint($key) { @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 is-lowest-breakpoint($key) { @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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
flint-gs-1.0.4 | stylesheets/flint/functions/lib/_calc-breakpoint.scss |