Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Bootstrap 4 Column Dividers
@import 'variables';
$divider-height: 100%;
@mixin make-column-dividers($breakpoints: $grid-breakpoints) {
// Common properties for all breakpoints
%col-divider {
position: absolute;
content: " ";
top: (100% - $divider-height)/2;
height: $divider-height;
width: $hr-border-width;
background-color: $hr-border-color;
}
@each $breakpoint in map-keys($breakpoints) {
.col-#{$breakpoint}-divider-right:before {
@include media-breakpoint-up($breakpoint) {
@extend %col-divider;
right: 0;
}
}
.col-#{$breakpoint}-divider-left:before {
@include media-breakpoint-up($breakpoint) {
@extend %col-divider;
left: 0;
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.