Skip to content

Instantly share code, notes, and snippets.

@tflight
Created November 8, 2019 01:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tflight/49f43d599e1e0bcaf301b3378366849c to your computer and use it in GitHub Desktop.
Save tflight/49f43d599e1e0bcaf301b3378366849c to your computer and use it in GitHub Desktop.
Responsive Column Count for Bootstrap 4
/**
* Responsive Column Counts with Bootstrap 4
* <div class="column-count-md-3">
* <p>Very long Lorem ipsum...</p>
* </div>
*/
@each $breakpoint in map-keys($grid-breakpoints) {
@include media-breakpoint-up($breakpoint) {
$infix: breakpoint-infix($breakpoint, $grid-breakpoints);
@for $i from 2 through $grid-columns {
.column-count#{$infix}-#{$i} {
column-count: $i;
// orphans: 2;
// widows: 3;
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment