// Isolation Syntax // ================ // Isolate // ------- // Set isolation as an override. // - $input : @mixin isolate( $input ) { $input : parse-span($input); $span : get-span-setting(span, $input); $location : get-span-setting(location, $input); $this-columns : get-span-setting(columns, $input); $this-gutters : get-span-setting(gutters, $input); $this-column-width : get-span-setting(column-width, $input); $this-layout-math : get-span-setting(layout-math, $input); $this-flow : get-span-setting(flow, $input); $push: get-isolation($span, $location, $columns, $gutters, $column-width, $layout-math); @include isolate-output($push, $this-flow); } // Get Isolation // ------------- // Return the isolation offset width // - $span : | // - $location : // - [$columns] : | // - [$gutters] : // - [$column-width] : // - [$layout-math] : fluid | static @function get-isolation( $span, $location, $columns : $columns, $gutters : $gutters, $column-width : $column-width, $layout-math : $layout-math ) { $context : column-sum($columns, $gutters); $width : null; @if type-of($location) == number and not unitless($location) { $width: $location; } @else { $push: get-location-position($span, $location, $columns) - 1; @if $push > 0 { $width: get-span-width($push, 1, $columns, $gutters, $column-width, $layout-math, $outer: outer); } @else { $width: null; } } @return $width; }