Sha256: 80e0c810fed295ef14ea2a03f4cd8a9b5076fc9b8f63cf921c43992ac656fb34

Contents?: true

Size: 1.61 KB

Versions: 69

Compression:

Stored size: 1.61 KB

Contents

// Padding Syntax
// ==============

// Prefix
// ------
// Add spanning-padding before an element.
// - $span  : <span>
@mixin prefix(
  $span
) {
  $inspect  : $span;
  $span     : map-merge((spread: wide), parse-span($span));
  $flow     : susy-get(flow, $span);
  $width    : span($span);

  @if is-inside($span) {
    $gutter: gutter($span);
    $width: if($gutter and comparable($width, $gutter), $width + $gutter, $width);
  }

  @include susy-inspect(prefix, $inspect);
  @include padding-output($width, null, $flow);
}

// Suffix
// ------
// Add spanning-padding after an element.
// - $span  : <span>
@mixin suffix(
  $span
) {
  $inspect  : $span;
  $span     : map-merge((spread: wide), parse-span($span));
  $flow     : susy-get(flow, $span);
  $width    : span($span);

  @if is-inside($span) {
    $gutter: gutter($span);
    $width: if($gutter and comparable($width, $gutter), $width + $gutter, $width);
  }

  @include susy-inspect(suffix, $inspect);
  @include padding-output(null, $width, $flow);
}

// Pad
// ---
// Add spanning-padding before and after an element.
// - $pre     : <span>
// - [$post]  : <span>
@mixin pad(
  $pre,
  $post: false
) {
  $inspect  : $pre, $post;
  $pre      : map-merge((spread: wide), parse-span($pre));

  @if $post {
    $post: map-merge((spread: wide), parse-span($post));
  } @else {
    $span: susy-get(span, $pre);
    @if length($span) > 1 {
      $pre: map-merge($pre, (span: nth($span, 1)));
      $post: map-merge($pre, (span: nth($span, 2)));
    } @else {
      $post: $pre;
    }
  }

  @include susy-inspect(pad, $inspect...);
  @include prefix($pre);
  @include suffix($post);

}

Version data entries

69 entries across 69 versions & 4 rubygems

Version Path
wrgem-0.0.46 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susy/_padding.scss
wrgem-0.0.45 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susy/_padding.scss
wrgem-0.0.44 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susy/_padding.scss
susy-2.2.2 sass/susy/language/susy/_padding.scss
susy-2.2.2.alpha.1 sass/susy/language/susy/_padding.scss
susy-2.2.1 sass/susy/language/susy/_padding.scss
susy-2.2.0.rc.2 sass/susy/language/susy/_padding.scss
susy-2.2.0.rc.1 sass/susy/language/susy/_padding.scss
susy-2.2.0.beta.3 sass/susy/language/susy/_padding.scss
susy-2.2.0.beta.2 sass/susy/language/susy/_padding.scss
wrgem-0.0.43 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susy/_padding.scss
wrgem-0.0.42 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susy/_padding.scss
wrgem-0.0.41 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susy/_padding.scss
wrgem-0.0.40 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susy/_padding.scss
wrgem-0.0.39 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susy/_padding.scss
wrgem-0.0.38 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susy/_padding.scss
wrgem-0.0.37 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susy/_padding.scss
wrgem-0.0.35 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susy/_padding.scss
wrgem-0.0.32 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susy/_padding.scss
wrgem-0.0.31 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susy/_padding.scss