Sha256: cf99631658019aa0ec42c48f27fc0dcde247d010d44bbd10098711cbd5ccb39b

Contents?: true

Size: 1.03 KB

Versions: 1

Compression:

Stored size: 1.03 KB

Contents

// Isolation Syntax
// ================

// Isolate
// -------
// Set isolation as an override.
// - $input   : <span>
@mixin isolate(
  $input: first
) {
  $input  : parse-span($input);
  $output : (
    push: get-isolation($input),
    flow: susy-get(flow, $input),
  );

  @include isolate-output($output...);
}

// Get Isolation
// -------------
// Return the isolation offset width
// - $input: <map>
@function get-isolation(
  $input
) {
  $span       : susy-get(span, $input);
  $location   : get-location($input);
  $columns    : susy-get(columns, $input);
  $width      : null;

  @if type-of($location) == number and not unitless($location) {
    $width: $location;
  } @else if $location {
    $push: $location - 1;
    @if $push > 0 {
      $push: map-merge($input, (
        span: $push,
        location: 1,
        spread: wide,
      ));
      $width: get-span-width($push);
    }
  }

  @if susy-get(gutter-position, $input) == split {
    $width: if($width == null, gutters($input), $width + gutters($input));
  }

  @return $width or 0;
}

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
susy-2.0.0.beta.1 sass/susy/language/susy/_isolate.scss