Sha256: 6ccfeb2215dacc8d7fd3da4ba3e0427c09bf885a52be67f061f2b5923810dcc2

Contents?: true

Size: 742 Bytes

Versions: 1

Compression:

Stored size: 742 Bytes

Contents

@use 'sass:list';

@mixin generateUtilityClasses($prefix, $property) {
  $scales: [0, .25, .5, 1, 1.5, 3];

  @for $i from 1 through list.length($scales) {
    // scale of current index
    $scale: list.nth($scales, $i);
    $space: var(--spacer);

    // create property
    .#{$prefix}-#{$i - 1} {
      #{$property}: calc(var(--spacer) * $scale);
    }
  }
}

// Margin utilities (ex: m-0, mt-1, mb-5)
@include generateUtilityClasses(m, margin);
@include generateUtilityClasses(mt, margin-top);
@include generateUtilityClasses(mb, margin-bottom);

// Padding utilities (ex: p-0, pt-1, pb-5)
@include generateUtilityClasses(p, padding);
@include generateUtilityClasses(pt, padding-top);
@include generateUtilityClasses(pb, padding-bottom);

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
jekyll-theme-gruv-poole-1.1.0 _sass/_utilities.scss