Sha256: 858d60b1763461482ff728efd9fc733bab095891cd3105e2472ecf44ecb1245e

Contents?: true

Size: 1.92 KB

Versions: 4

Compression:

Stored size: 1.92 KB

Contents

// Padding spacer utilities
// stylelint-disable comment-empty-line-before
// stylelint-disable primer/spacing

// Responsive padding spacer utilities
@each $breakpoint, $variant in $responsive-variants {
  @include breakpoint($breakpoint) {
    // Loop through the spacer values
    @each $scale, $size in $spacer-map-rem-extended {
      @if ($scale < length($spacer-map-rem)) {
        /* Set a $size padding to all sides at $breakpoint */
        .p#{$variant}-#{$scale}  { padding: $size !important; }
      }

      /* Set a $size padding to the top at $breakpoint */
      .pt#{$variant}-#{$scale} { padding-top: $size !important; }
      /* Set a $size padding to the right at $breakpoint */
      .pr#{$variant}-#{$scale} { padding-right: $size !important; }
      /* Set a $size padding to the bottom at $breakpoint */
      .pb#{$variant}-#{$scale} { padding-bottom: $size !important; }
      /* Set a $size padding to the left at $breakpoint */
      .pl#{$variant}-#{$scale} { padding-left: $size !important; }

      @if ($scale < length($spacer-map-rem)) {
        /* Set a $size padding to the left & right at $breakpoint */
        .px#{$variant}-#{$scale} {
          padding-right: $size !important;
          padding-left: $size !important;
        }
      }

      /* Set a $size padding to the top & bottom at $breakpoint */
      .py#{$variant}-#{$scale} {
        padding-top: $size !important;
        padding-bottom: $size !important;
      }
    }
  }
}

// responsive padding for containers
.p-responsive {
  padding-right: var(--base-size-16, $spacer-3) !important;
  padding-left: var(--base-size-16, $spacer-3) !important;

  @include breakpoint(sm) {
    padding-right: var(--base-size-40, $spacer-6) !important;
    padding-left: var(--base-size-40, $spacer-6) !important;
  }

  @include breakpoint(lg) {
    padding-right: var(--base-size-16, $spacer-3) !important;
    padding-left: var(--base-size-16, $spacer-3) !important;
  }
}

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
jekyll-v4-theme-primer-0.16.0 _sass/@primer/css/utilities/padding.scss
jekyll-v4-theme-primer-0.15.0 _sass/@primer/css/utilities/padding.scss
jekyll-v4-theme-primer-0.14.0 _sass/@primer/css/utilities/padding.scss
jekyll-v4-theme-primer-0.13.0 _sass/@primer/css/utilities/padding.scss