Created
October 19, 2018 19:23
-
-
Save madmax/3854e478a43ac959ac8a4f075b98366a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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; } | |
} | |
} | |
} | |
} | |
} |
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
As of Bootstrap 4.4.1 (maybe even lower versions)
@if $breakpoint != "xs" {
condition is not needed at all.