sass/susy/language/susy/_isolate.scss in susy-2.0.0.alpha.4 vs sass/susy/language/susy/_isolate.scss in susy-2.0.0.alpha.5
- old
+ new
@@ -4,55 +4,48 @@
// Isolate
// -------
// Set isolation as an override.
// - $input : <span>
@mixin isolate(
- $input
+ $input: first
) {
- $input : parse-span($input);
+ $input : parse-span($input);
+ $output : (
+ push: get-isolation($input),
+ flow: span-get(flow, $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);
+ @include isolate-output($output...);
}
// Get Isolation
// -------------
// Return the isolation offset width
-// - $span : <length> | <number>
-// - $location : <number>
-// - [$columns] : <number> | <list>
-// - [$gutters] : <ratio>
-// - [$column-width] : <length>
-// - [$layout-math] : fluid | static
+// - $input: <map>
@function get-isolation(
- $span,
- $location,
- $columns : $columns,
- $gutters : $gutters,
- $column-width : $column-width,
- $layout-math : $layout-math
+ $input
) {
- $context : column-sum($columns, $gutters);
- $width : null;
+ $span : span-get(span, $input);
+ $location : span-get(location, $input);
+ $columns : span-get(columns, $input);
+ $width : null;
@if type-of($location) == number and not unitless($location) {
$width: $location;
} @else {
- $push: get-location-position($span, $location, $columns) - 1;
+ $push: get-location($span, $location, $columns) - 1;
@if $push > 0 {
- $width: get-span-width($push, 1, $columns, $gutters, $column-width, $layout-math, $outer: outer);
- } @else {
- $width: null;
+ $push: map-merge($input, (
+ span: $push,
+ location: 1,
+ spread: wide,
+ ));
+ $width: get-span-width($push);
}
+ }
+
+ @if span-get(gutter-position, $input) == split {
+ $width: if($width == null, gutters($input), $width + gutters($input));
}
@return $width;
}