Sha256: 57b4d381a2fe0521ef6c64d72a7b6597730252fa53af540f9901a793f5814411

Contents?: true

Size: 1.45 KB

Versions: 51

Compression:

Stored size: 1.45 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 isolate-output($output...);
  @include susy-inspect(isolate, $inspect);
}


// 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 {
    $width: if($width == null, gutters($input), $width + gutters($input));
  }

  @return $width or 0;
}

Version data entries

51 entries across 51 versions & 2 rubygems

Version Path
wrgem-0.0.32 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susy/_isolate.scss
wrgem-0.0.31 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susy/_isolate.scss
wrgem-0.0.30 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susy/_isolate.scss
wrgem-0.0.29 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susy/_isolate.scss
wrgem-0.0.28 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susy/_isolate.scss
wrgem-0.0.27 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susy/_isolate.scss
wrgem-0.0.26 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susy/_isolate.scss
wrgem-0.0.25 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susy/_isolate.scss
wrgem-0.0.24 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susy/_isolate.scss
wrgem-0.0.23 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susy/_isolate.scss
wrgem-0.0.22 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susy/_isolate.scss
wrgem-0.0.21 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susy/_isolate.scss
wrgem-0.0.20 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susy/_isolate.scss
wrgem-0.0.19 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susy/_isolate.scss
wrgem-0.0.18 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susy/_isolate.scss
wrgem-0.0.17 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susy/_isolate.scss
wrgem-0.0.15 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susy/_isolate.scss
wrgem-0.0.14 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susy/_isolate.scss
wrgem-0.0.13 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susy/_isolate.scss
wrgem-0.0.12 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susy/_isolate.scss