Skip to content

Instantly share code, notes, and snippets.

@Wildhammer
Last active May 17, 2020 23:14
Show Gist options
  • Save Wildhammer/bd8d0ad1d899c6c5c1e43e59ecab561f to your computer and use it in GitHub Desktop.
Save Wildhammer/bd8d0ad1d899c6c5c1e43e59ecab561f to your computer and use it in GitHub Desktop.
@import "~bootstrap/scss/mixins/_breakpoints.scss";
@import "variables";
/* This will generate bootstrap style responsive classes for flex-basis
e.g. flex-basis-md-25*/
@each $breakpoint, $value in $breakpoints {
$min: breakpoint-min($breakpoint);
$breakpoint-name: if($min, -#{$breakpoint}, "");
@for $i from 1 through 4 {
@include media-breakpoint-up($breakpoint) {
.flex#{$breakpoint-name}-basis-#{$i*25} {
flex-basis: percentage($i * 0.25);
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment