Skip to content

Instantly share code, notes, and snippets.

@madmax

madmax/sizes.scss

Created Oct 19, 2018
Embed
What would you like to do?
/* 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

This comment has been minimized.

Copy link

@cotwitch cotwitch commented Apr 30, 2020

As of Bootstrap 4.4.1 (maybe even lower versions)

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

@madmax

This comment has been minimized.

Copy link
Owner Author

@madmax 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