Sha256: 51c4d19eab6191bc1660719af1eb6f2d988155622ca36bde56d5f68ac7239cdb

Contents?: true

Size: 707 Bytes

Versions: 9

Compression:

Stored size: 707 Bytes

Contents

/* Add Tailwindcss-ish margin and padding helpers */

$sizes: 
  0 0,
  1 0.25,
  2 0.5,
  3 0.75,
  4 1,
  5 1.25,
  6 1.5,
  8 2,
  10 2.5,
  12 3,
  16 4,
  20 5,
  24 6,
  32 8,
  40 10,
  48 12,
  56 14,
  64 16;
$positions: ('top','left','bottom','right');

@each $index, $size in $sizes {
  @each $position in $positions {
    .m#{str-slice($position, 0, 1)}-#{$index} {
      margin-#{$position}: $size + rem;
    }
    .p#{str-slice($position, 0, 1)}-#{$index} {
      padding-#{$position}: $size + rem;
    }
    .-m#{str-slice($position, 0, 1)}-#{$index} {
      margin-#{$position}: -$size + rem;
    }
  }
}

.m-auto {
  margin: auto;
}
.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
yarii-editor-0.4.8 app/styles/helpers.scss
yarii-editor-0.4.7 app/styles/helpers.scss
yarii-editor-0.4.6 app/styles/helpers.scss
yarii-editor-0.4.5 app/styles/helpers.scss
yarii-editor-0.4.4 app/styles/helpers.scss
yarii-editor-0.4.3 app/styles/helpers.scss
yarii-editor-0.4.2 app/styles/helpers.scss
yarii-editor-0.4.1 app/styles/helpers.scss
yarii-editor-0.4.0 app/styles/helpers.scss