Sha256: 19179f15c76926da8c079684b0f640df72f8fe7d1ed840829d128f2cfa215611

Contents?: true

Size: 1.05 KB

Versions: 1

Compression:

Stored size: 1.05 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: span-get(flow, $input),
  );

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

// Get Isolation
// -------------
// Return the isolation offset width
// - $input: <map>
@function get-isolation(
  $input
) {
  $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($span, $location, $columns) - 1;
    @if $push > 0 {
      $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;
}

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
susy-2.0.0.alpha.5 sass/susy/language/susy/_isolate.scss