Skip to content

Instantly share code, notes, and snippets.

@tflight
Created November 6, 2019 20:46
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/4c0f33b2a40dcea9796d48902fdf8067 to your computer and use it in GitHub Desktop.
Save tflight/4c0f33b2a40dcea9796d48902fdf8067 to your computer and use it in GitHub Desktop.
Responsive Bootstrap 4 Borders
// @link https://github.com/twbs/bootstrap/issues/23892#issuecomment-396831166
@each $breakpoint in map-keys($grid-breakpoints) {
@include media-breakpoint-up($breakpoint) {
$infix: breakpoint-infix($breakpoint, $grid-breakpoints);
.border#{$infix}-top { border-top: $border-width solid $border-color ; }
.border#{$infix}-right { border-right: $border-width solid $border-color ; }
.border#{$infix}-bottom { border-bottom: $border-width solid $border-color ; }
.border#{$infix}-left { border-left: $border-width solid $border-color ; }
.border#{$infix}-top-0 { border-top: 0 !important; }
.border#{$infix}-right-0 { border-right: 0 !important; }
.border#{$infix}-bottom-0 { border-bottom: 0 !important; }
.border#{$infix}-left-0 { border-left: 0 !important; }
.border#{$infix}-x {
border-left: $border-width solid $border-color ;
border-right: $border-width solid $border-color ;
}
.border#{$infix}-y {
border-top: $border-width solid $border-color ;
border-bottom: $border-width solid $border-color ;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment