Sha256: 2daeb16a20e96e081bf34aedb44662754a5bf19bf7d8274add5dc0e08536e0a2

Contents?: true

Size: 1.73 KB

Versions: 14

Compression:

Stored size: 1.73 KB

Contents

// ---------------------------------------------------------------------------
// Padding Mixins

// add empty colums as padding before an element.
// $columns : The number of columns to prefix.
// $context : [optional] The context (columns spanned by parent).
//          : Context is required on any nested elements.
//          : Context MUST NOT be declared on a root element.
// $from    : The start direction of your layout (e.g. 'left' for ltr languages)
@mixin prefix(
  $columns,
  $context  : $total-columns,
  $from     : $from-direction
) {
  padding-#{$from}: space($columns, $context);
}

// add empty colums as padding after an element.
// $columns : The number of columns to suffix.
// $context : [optional] The context (columns spanned by parent).
//          : Context is required on any nested elements.
//          : Context MUST NOT be declared on a root element.
// $from    : The start direction of your layout (e.g. 'left' for ltr languages)
@mixin suffix(
  $columns,
  $context  : $total-columns,
  $from     : $from-direction
) {
  $to           : opposite-position($from);
  padding-#{$to}: space($columns, $context);
}

// add empty colums as padding before and after an element.
// $columns : The number of columns to pad.
// $context : [optional] The context (columns spanned by parent).
//          : Context is required on any nested elements.
//          : Context MUST NOT be declared on a root element.
// $from    : The start direction of your layout (e.g. 'left' for ltr languages)
@mixin pad(
  $prefix   : false,
  $suffix   : false,
  $context  : $total-columns,
  $from     : $from-direction
) {
  @if $prefix {
    @include prefix($prefix, $context, $from);
  }
  @if $suffix {
    @include suffix($suffix, $context, $from);
  }
}

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
susy-1.0.5.alpha.0 sass/susy/_padding.scss
susy-1.0.4 sass/susy/_padding.scss
susy-1.0.3 sass/susy/_padding.scss
susy-1.0.2 sass/susy/_padding.scss
susy-1.0.1 sass/susy/_padding.scss
susy-1.0 sass/susy/_padding.scss
susy-1.0.rc.4 sass/susy/_padding.scss
susy-1.0.rc.3 sass/susy/_padding.scss
susy-1.0.rc.2 sass/susy/_padding.scss
susy-1.0.rc.1 sass/susy/_padding.scss
susy-1.0.rc.0 sass/susy/_padding.scss
susy-1.0.alpha.2 sass/susy/_padding.scss
susy-1.0.alpha.1 sass/susy/_padding.scss
susy-1.0.alpha.0 sass/susy/_padding.scss