Skip to content

Instantly share code, notes, and snippets.

@madmax
Created October 19, 2018 19:23
Show Gist options
  • Star 9 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save madmax/3854e478a43ac959ac8a4f075b98366a to your computer and use it in GitHub Desktop.
Save madmax/3854e478a43ac959ac8a4f075b98366a to your computer and use it in GitHub Desktop.
/* responsive version for sizes, we don't generate xs because it is arleady generated by bootstrap */
@each $breakpoint in map-keys($grid-breakpoints) {
@if $breakpoint != "xs" {
@include media-breakpoint-up($breakpoint) {
$infix: breakpoint-infix($breakpoint, $grid-breakpoints);
@each $prop, $abbrev in (width: w, height: h) {
@each $size, $length in $sizes {
.#{$abbrev}#{$infix}-#{$size} { #{$prop}: $length !important; }
}
}
}
}
}
@cotwitch
Copy link

As of Bootstrap 4.4.1 (maybe even lower versions)

@if $breakpoint != "xs" { condition is not needed at all.

@madmax
Copy link
Author

madmax commented Apr 30, 2020

Why? We dont override exiting styles and have them twice?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment