Last active
June 4, 2018 18:29
-
-
Save spaceemotion/0f750c975fbe9ddf49dc9ab6e69bbfeb to your computer and use it in GitHub Desktop.
Responsive Border Utilities for Bootstrap 4.1
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
// stylelint-disable declaration-no-important | |
// | |
// Border | |
// | |
@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 !important; } | |
.border#{$infix}-right { border-right: $border-width solid $border-color !important; } | |
.border#{$infix}-bottom { border-bottom: $border-width solid $border-color !important; } | |
.border#{$infix}-left { border-left: $border-width solid $border-color !important; } | |
.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 !important; | |
border-right: $border-width solid $border-color !important; | |
} | |
.border#{$infix}-y { | |
border-top: $border-width solid $border-color !important; | |
border-bottom: $border-width solid $border-color !important; | |
} | |
} | |
} | |
@each $color, $value in $theme-colors { | |
.border-#{$color} { | |
border-color: $value !important; | |
} | |
} | |
.border-white { | |
border-color: $white !important; | |
} | |
// | |
// Border-radius | |
// | |
.rounded { | |
border-radius: $border-radius !important; | |
} | |
.rounded-top { | |
border-top-left-radius: $border-radius !important; | |
border-top-right-radius: $border-radius !important; | |
} | |
.rounded-right { | |
border-top-right-radius: $border-radius !important; | |
border-bottom-right-radius: $border-radius !important; | |
} | |
.rounded-bottom { | |
border-bottom-right-radius: $border-radius !important; | |
border-bottom-left-radius: $border-radius !important; | |
} | |
.rounded-left { | |
border-top-left-radius: $border-radius !important; | |
border-bottom-left-radius: $border-radius !important; | |
} | |
.rounded-circle { | |
border-radius: 50% !important; | |
} | |
.rounded-0 { | |
border-radius: 0 !important; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment