diff options
| author | Mauricio Hernan Cabrera <[email protected]> | 2020-09-09 05:28:52 -0300 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-09-09 11:28:52 +0300 |
| commit | 6455c2e8aa024442a9b31c4a7cc5200b76c3d38a (patch) | |
| tree | e7e16914b146769d7d2ac6bbe1c689bac35635aa | |
| parent | 2a249557f15786bed0b5a137f964abb091e2e6e1 (diff) | |
| download | bootstrap-6455c2e8aa024442a9b31c4a7cc5200b76c3d38a.tar.xz bootstrap-6455c2e8aa024442a9b31c4a7cc5200b76c3d38a.zip | |
Add border width utility (#31484)
Co-authored-by: XhmikosR <[email protected]>
Co-authored-by: Martijn Cuppens <[email protected]>
| -rw-r--r-- | scss/_utilities.scss | 5 | ||||
| -rw-r--r-- | scss/_variables.scss | 8 | ||||
| -rw-r--r-- | site/content/docs/5.0/migration.md | 1 | ||||
| -rw-r--r-- | site/content/docs/5.0/utilities/borders.md | 10 |
4 files changed, 24 insertions, 0 deletions
diff --git a/scss/_utilities.scss b/scss/_utilities.scss index 7c818685a..69615ec4e 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 8ac8b143b..dee45b750 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 03657ea0f..2c9dc4011 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 5cf1ed29d..ec2a7cbc0 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. <span class="border border-white"></span> {{< /example >}} +### Border-width + +{{< example class="bd-example-border-utils" >}} +<span class="border border-1"></span> +<span class="border border-2"></span> +<span class="border border-3"></span> +<span class="border border-4"></span> +<span class="border border-5"></span> +{{< /example >}} + ## Border-radius Add classes to an element to easily round its corners. |
