Sha256: b0ca7ac01e09ed19cc49caef13dd3c88aff32f2413a1cf3b06f35e8c68736697

Contents?: true

Size: 1.56 KB

Versions: 24

Compression:

Stored size: 1.56 KB

Contents

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


// Isolate [Mixin]
// ---------------
// Set isolation as an override.
// - $location: <span>
@mixin isolate(
  $isolate: 1
) {
  $inspect: $isolate;

  $output: (
    push: isolate($isolate),
    flow: susy-get(flow, $isolate),
  );

  @include susy-inspect(isolate, $inspect);
  @include isolate-output($output...);
}


// Isolate [function]
// ------------------
// Return an isolation offset width.
// - $location: <span>
@function isolate(
  $isolate: 1
) {
  $isolate: parse-span($isolate);
  $isolation: susy-get(span, $isolate);

  @if $isolation and not(get-location($isolate)) {
    $new: (
      span: null,
      location: $isolation,
    );
    $isolate: map-merge($isolate, $new);
  }

  @return get-isolation($isolate);
}


// Get Isolation
// -------------
// Return the isolation offset width
// - $input: <map>
@function get-isolation(
  $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
      and susy-get(gutters, $input) > 0 {
    $width: if($width == null, gutters($input), $width + gutters($input));
  }

  @return $width or 0;
}

Version data entries

24 entries across 24 versions & 3 rubygems

Version Path
jekyll-theme-basically-basic-1.1.3 _sass/basically-basic/vendor/susy/language/susy/_isolate.scss
jekyll-theme-basically-basic-1.1.2 _sass/basically-basic/vendor/susy/language/susy/_isolate.scss
jekyll-theme-basically-basic-1.1.1 _sass/basically-basic/vendor/susy/language/susy/_isolate.scss
minimal-mistakes-jekyll-4.4.2 _sass/minimal-mistakes/vendor/susy/susy/language/susy/_isolate.scss
minimal-mistakes-jekyll-4.4.0 _sass/minimal-mistakes/vendor/susy/susy/language/susy/_isolate.scss
sparrow-jekyll-theme-0.1.1 _sass/vendor/susy/susy/language/susy/_isolate.scss
sparrow-jekyll-theme-0.1.0 _sass/vendor/susy/susy/language/susy/_isolate.scss
jekyll-theme-basically-basic-1.1.0 _sass/basically-basic/vendor/susy/language/susy/_isolate.scss
jekyll-theme-basically-basic-1.0.1 _sass/basically-basic/vendor/susy/language/susy/_isolate.scss
minimal-mistakes-jekyll-4.3.1 _sass/vendor/susy/susy/language/susy/_isolate.scss
minimal-mistakes-jekyll-4.3.0 _sass/vendor/susy/susy/language/susy/_isolate.scss
minimal-mistakes-jekyll-4.2.2 _sass/vendor/susy/susy/language/susy/_isolate.scss
minimal-mistakes-jekyll-4.2.1 _sass/vendor/susy/susy/language/susy/_isolate.scss
minimal-mistakes-jekyll-4.2.0 _sass/vendor/susy/susy/language/susy/_isolate.scss
minimal-mistakes-jekyll-4.1.0 _sass/vendor/susy/susy/language/susy/_isolate.scss
minimal-mistakes-jekyll-4.0.10 _sass/vendor/susy/susy/language/susy/_isolate.scss
minimal-mistakes-jekyll-4.0.9 _sass/vendor/susy/susy/language/susy/_isolate.scss
minimal-mistakes-jekyll-4.0.8 _sass/vendor/susy/susy/language/susy/_isolate.scss
minimal-mistakes-jekyll-4.0.7 _sass/vendor/susy/susy/language/susy/_isolate.scss
minimal-mistakes-jekyll-4.0.6 _sass/vendor/susy/susy/language/susy/_isolate.scss