// Row Start & End // =============== // Break // ----- // Apply to any element that should force a line break. @mixin break { clear: both; } // NoBreak // ------- // Cancel the break() effect, e.g. when using media queries. @mixin nobreak { clear: none; } // Full // ---- // - [$span]: @mixin full( $context: $susy ) { @include span(full of parse-grid($context) break); } // First // ----- // - [$grid]: @mixin first( $grid: $susy ) { $grid: parse-grid($grid); $flow: susy-get(flow, $grid); @if not is-split($grid) { @include float-first($flow); } } @mixin alpha( $grid: $susy ) { @include first($grid); } // Last // ---- // - [$grid]: @mixin last( $grid: $susy ) { $grid: parse-grid($grid); $output: ( flow: susy-get(flow, $grid), margin: if(is-split($grid), gutters($grid), 0), ); @include float-last($output...); } @mixin omega( $grid: $susy ) { @include last($grid); } // Get Edge // -------- // Calculate edge value based on location, if possible @function get-edge( $span ) { $span : parse-span($span); $edge : susy-get(edge, $span); @if not $edge { $count: column-count(susy-get(columns, $span)); $location: susy-get(location, $span); $n: susy-get(span, $span); @if $n == $count { $edge: full; } @else if $location { @if $location == 1 { $edge: if($n == $count, full, first); } @else if $location + $n - 1 == $count { $edge: last; } } } @if $edge == alpha or $edge == omega { $edge: if($edge == alpha, first, last); } @return $edge; } // Get Location // ------------ // Calculate location value based on edge, if possible @function get-location( $span ) { $span : parse-span($span); $location : susy-get(location, $span); $edge : get-edge($span); $n : susy-get(span, $span); @if $edge and not $location and type-of($n) == number and unitless($n) { @if $edge == first { $location: 1; } @else if $edge == last { $location: column-count(susy-get(columns, $span)) - $n + 1; } } @return $location }