@mixin output-float($span, $location, $columns, $gutter, $options: false) { $location-holder: $location; @if type-of($location) == string { @if end-row($span, $location, $columns) { $grid-length: length(find-grid($columns)); $location-holder: $grid-length - $span; } @else { $location-holder: 1; } } $gutter: find-gutter($gutter); $end-row: end-row($span, $location, $columns); width: column-span($span, $location-holder, $columns, $gutter); @if $direction == 'ltr' or $direction == 'both' { // Set the CSS direction to ltr $cssdir: 'ltr'; // Find the CSS named direction and opposite direction $dir: named-direction($cssdir); $opp: opposite-direction($dir); clear: $opp; @if $end-row { float: $opp; } @else { float: $dir; margin-#{$opp}: gutter-span($gutter, $columns); } } @if $direction == 'rtl' or $direction == 'both' { // Set the CSS direction to ltr $cssdir: 'rtl'; // Find the CSS named direction and opposite direction $dir: named-direction($cssdir); $opp: opposite-direction($dir); [dir="#{$cssdir}"] & { clear: $opp; @if $end-row { float: $opp; } @else { float: $dir; margin-#{$dir}: 0; margin-#{$opp}: gutter-span($gutter, $columns); } } } @include span-shared; } @mixin push-float($span, $location, $columns: false, $gutter: false) { @if type-of($location) == string { $location: 1; } // Find the columns and gutters $columns: find-grid($columns); $gutter: find-gutter($gutter); // Combine the columns and gutters $gutter: column-span($span, $location, $columns, $gutter) + gutter-span($gutter, $columns); margin-left: $gutter; } @mixin pull-float($span, $location, $columns: false, $gutter: false) { @if type-of($location) == string { $location: 1; } // Find the columns and gutters $columns: find-grid($columns); $gutter: find-gutter($gutter); // Combine the columns and gutters $gutter: (column-span($span, $location, $columns, $gutter) + gutter-span($gutter, $columns)) * -1; margin-left: $gutter; }