From 6455c2e8aa024442a9b31c4a7cc5200b76c3d38a Mon Sep 17 00:00:00 2001 From: Mauricio Hernan Cabrera Date: Wed, 9 Sep 2020 05:28:52 -0300 Subject: [PATCH] Add border width utility (#31484) Co-authored-by: XhmikosR Co-authored-by: Martijn Cuppens --- scss/_utilities.scss | 5 +++++ scss/_variables.scss | 8 ++++++++ site/content/docs/5.0/migration.md | 1 + site/content/docs/5.0/utilities/borders.md | 10 ++++++++++ 4 files changed, 24 insertions(+) diff --git a/scss/_utilities.scss b/scss/_utilities.scss index 7c818685a4..69615ec4e6 100644 --- a/scss/_utilities.scss +++ b/scss/_utilities.scss @@ -79,6 +79,11 @@ $utilities: map-merge( class: border, values: map-merge($theme-colors, ("white": $white)) ), + "border-width": ( + property: border-width, + class: border, + values: $border-widths + ), // Sizing utilities "width": ( property: width, diff --git a/scss/_variables.scss b/scss/_variables.scss index 8ac8b143bf..dee45b7503 100644 --- a/scss/_variables.scss +++ b/scss/_variables.scss @@ -338,6 +338,14 @@ $border-color: $gray-300 !default; $border-radius: .25rem !default; $border-radius-sm: .2rem !default; $border-radius-lg: .3rem !default; +$border-widths: ( + 0: 0, + 1: 1px, + 2: 2px, + 3: 3px, + 4: 4px, + 5: 5px +) !default; $rounded-pill: 50rem !default; diff --git a/site/content/docs/5.0/migration.md b/site/content/docs/5.0/migration.md index 03657ea0fd..2c9dc4011c 100644 --- a/site/content/docs/5.0/migration.md +++ b/site/content/docs/5.0/migration.md @@ -15,6 +15,7 @@ toc: true - Changed the Sass file from `scss/helpers/_screenreaders.scss` to `scss/helpers/_visually-hidden.scss` - Renamed `.sr-only` and `.sr-only-focusable` to `.visually-hidden` and `.visually-hidden-focusable` - Renamed `sr-only()` and `sr-only-focusable()` mixins to `visually-hidden()` and `visually-hidden-focusable()`. +- Add border width utility, see [31484](https://github.com/twbs/bootstrap/pull/31484) ### Docs diff --git a/site/content/docs/5.0/utilities/borders.md b/site/content/docs/5.0/utilities/borders.md index 5cf1ed29db..ec2a7cbc04 100644 --- a/site/content/docs/5.0/utilities/borders.md +++ b/site/content/docs/5.0/utilities/borders.md @@ -43,6 +43,16 @@ Change the border color using utilities built on our theme colors. {{< /example >}} +### Border-width + +{{< example class="bd-example-border-utils" >}} + + + + + +{{< /example >}} + ## Border-radius Add classes to an element to easily round its corners.