Skip to content

Instantly share code, notes, and snippets.

@shaneparsons
Last active April 9, 2018 18:26
Show Gist options
  • Save shaneparsons/eb4ac2f3bf5e9741ef0ab55ae3224161 to your computer and use it in GitHub Desktop.
Save shaneparsons/eb4ac2f3bf5e9741ef0ab55ae3224161 to your computer and use it in GitHub Desktop.
Bootstrap 4 additions / utilities / overrides

Responsive sizing

$sizes: (
  auto: auto,
  25: 25%,
  50: 50%,
  75: 75%,
  100: 100%,
);

@each $breakpoint in map-keys($grid-breakpoints) {
  @include media-breakpoint-up($breakpoint) {
    $infix: breakpoint-infix($breakpoint, $grid-breakpoints);
    @each $prop, $abbrev in (width: w, height: h) {
      // NOTE: you can add (max-width: mw, max-height: mh) above if needed
      @each $size, $length in $sizes {
        .#{$abbrev}#{$infix}-#{$size} { #{$prop}: $length !important; }
      }
    }
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment