Sha256: 9e208e49aaadb20f223d0f4dac6d490f9ddeaf238cae167bbd02aaab05873e8b

Contents?: true

Size: 1.48 KB

Versions: 91

Compression:

Stored size: 1.48 KB

Contents

$spacer                                     : 24px !default;
$spacer-x                                   : $spacer !default;
$spacer-y                                   : $spacer !default;
$spacers: (
  0: (
    x : 0,
    y : 0
  ),
  quarter: (
    x : ($spacer-x * 0.25),
    y : ($spacer-y * 0.25)
  ),
  half: (
    x : ($spacer-x * 0.5),
    y : ($spacer-y * 0.5)
  ),
  base: (
    x : $spacer-x,
    y : $spacer-y
  ),
  base-half: (
    x : $spacer-x * 1.5,
    y : $spacer-y * 1.5
  ),
  double: (
    x : ($spacer-x * 2),
    y : ($spacer-y * 2)
  ),
  double-half: (
    x : ($spacer-x * 2.5),
    y : ($spacer-y * 2.5)
  ),
  triple: (
    x : ($spacer-x * 3),
    y : ($spacer-y * 3)
  )
);

@each $prop, $abbrev in (margin: m, padding: p) {
  @each $size, $lengths in $spacers {
    $length-x:   map-get($lengths, x);
    $length-y:   map-get($lengths, y);

    .#{$abbrev}-a-#{$size} { #{$prop}:        $length-y $length-x !important; } // a = All sides
    .#{$abbrev}-t-#{$size} { #{$prop}-top:    $length-y !important; }
    .#{$abbrev}-r-#{$size} { #{$prop}-right:  $length-x !important; }
    .#{$abbrev}-b-#{$size} { #{$prop}-bottom: $length-y !important; }
    .#{$abbrev}-l-#{$size} { #{$prop}-left:   $length-x !important; }

    // Axes
    .#{$abbrev}-x-#{$size} {
      #{$prop}-right:  $length-x !important;
      #{$prop}-left:   $length-x !important;
    }
    .#{$abbrev}-y-#{$size} {
      #{$prop}-top:    $length-y !important;
      #{$prop}-bottom: $length-y !important;
    }
  }
}

Version data entries

91 entries across 91 versions & 1 rubygems

Version Path
nfg_ui-0.12.13 app/assets/stylesheets/nfg_ui/network_for_good/email/nfg_theme/_spacers.scss
nfg_ui-0.12.12 app/assets/stylesheets/nfg_ui/network_for_good/email/nfg_theme/_spacers.scss
nfg_ui-0.12.11 app/assets/stylesheets/nfg_ui/network_for_good/email/nfg_theme/_spacers.scss
nfg_ui-0.12.10 app/assets/stylesheets/nfg_ui/network_for_good/email/nfg_theme/_spacers.scss
nfg_ui-0.12.9 app/assets/stylesheets/nfg_ui/network_for_good/email/nfg_theme/_spacers.scss
nfg_ui-0.12.8 app/assets/stylesheets/nfg_ui/network_for_good/email/nfg_theme/_spacers.scss
nfg_ui-0.12.7 app/assets/stylesheets/nfg_ui/network_for_good/email/nfg_theme/_spacers.scss
nfg_ui-0.12.6 app/assets/stylesheets/nfg_ui/network_for_good/email/nfg_theme/_spacers.scss
nfg_ui-0.12.5 app/assets/stylesheets/nfg_ui/network_for_good/email/nfg_theme/_spacers.scss
nfg_ui-0.12.4 app/assets/stylesheets/nfg_ui/network_for_good/email/nfg_theme/_spacers.scss
nfg_ui-0.12.3 app/assets/stylesheets/nfg_ui/network_for_good/email/nfg_theme/_spacers.scss
nfg_ui-0.12.2 app/assets/stylesheets/nfg_ui/network_for_good/email/nfg_theme/_spacers.scss
nfg_ui-0.12.1 app/assets/stylesheets/nfg_ui/network_for_good/email/nfg_theme/_spacers.scss
nfg_ui-0.12.0.5 app/assets/stylesheets/nfg_ui/network_for_good/email/nfg_theme/_spacers.scss
nfg_ui-0.12.0.4 app/assets/stylesheets/nfg_ui/network_for_good/email/nfg_theme/_spacers.scss
nfg_ui-0.12.0.3 app/assets/stylesheets/nfg_ui/network_for_good/email/nfg_theme/_spacers.scss
nfg_ui-0.12.0.2 app/assets/stylesheets/nfg_ui/network_for_good/email/nfg_theme/_spacers.scss
nfg_ui-0.12.0.1 app/assets/stylesheets/nfg_ui/network_for_good/email/nfg_theme/_spacers.scss
nfg_ui-0.12.0 app/assets/stylesheets/nfg_ui/network_for_good/email/nfg_theme/_spacers.scss
nfg_ui-0.11.18 app/assets/stylesheets/nfg_ui/network_for_good/email/nfg_theme/_spacers.scss