Skip to content

Commit

Permalink
Add border width utility (#31484)
Browse files Browse the repository at this point in the history
Co-authored-by: XhmikosR <[email protected]>
Co-authored-by: Martijn Cuppens <[email protected]>
  • Loading branch information
3 people authored Sep 9, 2020
1 parent 2a24955 commit 6455c2e
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 0 deletions.
5 changes: 5 additions & 0 deletions scss/_utilities.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
8 changes: 8 additions & 0 deletions scss/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
1 change: 1 addition & 0 deletions site/content/docs/5.0/migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
10 changes: 10 additions & 0 deletions site/content/docs/5.0/utilities/borders.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 6455c2e

Please sign in to comment.