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.55 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susy/_padding.scss
susy-2.2.11 sass/susy/language/susy/_padding.scss
susy-2.2.10 sass/susy/language/susy/_padding.scss
wrgem-0.0.54 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susy/_padding.scss
susy-2.2.9 sass/susy/language/susy/_padding.scss
susy-2.2.8 sass/susy/language/susy/_padding.scss
susy-2.2.7 sass/susy/language/susy/_padding.scss
wrgem-0.0.53 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susy/_padding.scss
wrgem-0.0.52 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susy/_padding.scss
wrgem-0.0.51 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susy/_padding.scss
ghost-manager-1.0.0 magneto/source/assets/bower_components/susy/sass/susy/language/susy/_padding.scss
susy-2.2.6 sass/susy/language/susy/_padding.scss
mifflin-0.1.1 vendor/assets/bower_components/susy/sass/susy/language/susy/_padding.scss
susy-2.2.5 sass/susy/language/susy/_padding.scss
susy-2.2.4 sass/susy/language/susy/_padding.scss
susy-2.2.3 sass/susy/language/susy/_padding.scss
wrgem-0.0.50 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susy/_padding.scss
wrgem-0.0.49 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susy/_padding.scss
wrgem-0.0.48 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susy/_padding.scss
wrgem-0.0.47 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susy/_padding.scss