Sha256: 32c90dbd1e7cbbee8f6fc7c32f1808f2a149143fae36698d60135058094ba51b

Contents?: true

Size: 1.75 KB

Versions: 7

Compression:

Stored size: 1.75 KB

Contents

// Padding spacer utilities
// stylelint-disable block-opening-brace-space-before, declaration-colon-space-before, primer/selector-no-utility
@for $i from 1 through length($spacers) {
  $size: #{nth($spacers, $i)};
  $scale: #{$i - 1};

  // .p-0, .p-1, .p-2...
  .p-#{$scale}   { padding       : #{$size} !important; }
  .pt-#{$scale}  { padding-top   : #{$size} !important; }
  .pr-#{$scale}  { padding-right : #{$size} !important; }
  .pb-#{$scale}  { padding-bottom: #{$size} !important; }
  .pl-#{$scale}  { padding-left  : #{$size} !important; }

  .px-#{$scale} {
    padding-right: #{$size} !important;
    padding-left: #{$size} !important;
  }

  .py-#{$scale} {
    padding-top: #{$size} !important;
    padding-bottom: #{$size} !important;
  }
}

// Responsive padding spacer utilities

// Loop through the breakpoint values
@each $breakpoint in map-keys($breakpoints) {

  // Loop through the spacer values
  @for $i from 1 through length($spacers) {
    @include breakpoint($breakpoint) {
      $size: #{nth($spacers, $i)}; // xs, sm, md, lg, xl
      $scale: #{$i - 1};  // 0, 1, 2, 3, 4, 5, 6

      // .p-sm-0, .p-md-1, .p-lg-2...
      .p-#{$breakpoint}-#{$scale}  { padding: #{$size} !important; }
      .pt-#{$breakpoint}-#{$scale} { padding-top: #{$size} !important; }
      .pr-#{$breakpoint}-#{$scale} { padding-right: #{$size} !important; }
      .pb-#{$breakpoint}-#{$scale} { padding-bottom: #{$size} !important; }
      .pl-#{$breakpoint}-#{$scale} { padding-left: #{$size} !important; }

      .px-#{$breakpoint}-#{$scale} {
        padding-right: #{$size} !important;
        padding-left: #{$size} !important;
      }

      .py-#{$breakpoint}-#{$scale} {
        padding-top: #{$size} !important;
        padding-bottom: #{$size} !important;
      }
    }
  }
}

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
jekyll-theme-primer-0.1.7 _sass/primer-utilities/lib/padding.scss
jekyll-theme-primer-0.1.6 _sass/primer-utilities/lib/padding.scss
jekyll-theme-primer-0.1.5 _sass/primer-utilities/lib/padding.scss
jekyll-theme-primer-0.1.4 _sass/primer-utilities/lib/padding.scss
jekyll-theme-primer-0.1.3 _sass/primer-utilities/lib/padding.scss
jekyll-theme-primer-0.1.2 _sass/primer-utilities/lib/padding.scss
jekyll-theme-primer-0.1.1 _sass/primer-utilities/lib/padding.scss