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.30 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susy/_padding.scss
wrgem-0.0.29 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susy/_padding.scss
wrgem-0.0.28 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susy/_padding.scss
wrgem-0.0.27 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susy/_padding.scss
wrgem-0.0.26 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susy/_padding.scss
wrgem-0.0.25 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susy/_padding.scss
wrgem-0.0.24 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susy/_padding.scss
wrgem-0.0.23 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susy/_padding.scss
wrgem-0.0.22 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susy/_padding.scss
wrgem-0.0.21 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susy/_padding.scss
wrgem-0.0.20 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susy/_padding.scss
wrgem-0.0.19 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susy/_padding.scss
wrgem-0.0.18 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susy/_padding.scss
wrgem-0.0.17 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susy/_padding.scss
wrgem-0.0.15 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susy/_padding.scss
wrgem-0.0.14 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susy/_padding.scss
wrgem-0.0.13 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susy/_padding.scss
wrgem-0.0.12 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susy/_padding.scss
wrgem-0.0.11 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susy/_padding.scss
wrgem-0.0.10 lib/generators/wrstart/template/vendor/assets/components/susy/sass/susy/language/susy/_padding.scss