Sha256: bba2ac645cf97dcaacc124517bd7568c8587a9c766e9529f2019573b28b1c4b9
Contents?: true
Size: 1.18 KB
Versions: 2
Compression:
Stored size: 1.18 KB
Contents
// Location math // ============= // Is Last // ------- // Find if a span covers the last columns // - $span : <number> // - $location : first | last | <number> // - [$columns] : <number> | <list> @function is-last( $span, $location, $columns: susy-get(columns) ) { $last: column-count($columns) - $span + 1; $is-last: if(index(last omega, $location), $last, false); @if type-of($location) == number { $is-last: if($location + ($span - 1) == column-count($columns), $location, false); } @return $is-last; } // Is First // -------- // Find if a span covers the first columns // - $location : first | last | <number> @function is-first( $location ) { @return if(index(first alpha 1, $location), 1, false); } // Get Location Position // --------------------- // Return a numeric location, even if a first/last keyword is used // - $span : <number> // - $location : first | last | <number> // - [$columns] : <number> | <list> @function get-location( $span, $location, $columns: susy-get(columns) ) { $string: if(type-of($location) == string, true, false); @return if($string, is-first($location) or is-last($span, $location, $columns), $location); }
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
susy-2.0.0.alpha.6 | sass/susy/math/_location.scss |
susy-2.0.0.alpha.5 | sass/susy/math/_location.scss |