Use shorthand border utility classes to control border, border width and border color on elements.
Border utility classes can be defined using the format -b{sides}{size}
.
t
- use to apply border-top
b
- use to apply border-bottom
l
- use to apply border-left
r
- use to apply border-right
x
- use to apply border-left
and border-right
y
- use to apply border-top
and border-bottom
border
to all 4 sides.0
- use to eliminate existing border
and set to 0
1
- use to set border
to 1px
2
- use to set border
to 2px
3
- use to set border
to 3px
4
- use to set border
to 4px
Apply borders to specific sides of an element by adding t
,
b
, l
, r
, x
or y
to the class name.
<div class="-bt1"></div>
<div class="-br1"></div>
<div class="-bb1"></div>
<div class="-bl1"></div>
<div class="-bx1"></div>
<div class="-by1"></div>
Control an elements border size by adjusting the size from 0
- 4
.
<div class="-b0"></div>
<div class="-b1"></div>
<div class="-b2"></div>
<div class="-b3"></div>
<div class="-b4"></div>
Use contextual color classes to change a borders color.
<div class="-b1"></div>
<div class="-b1 -bBrand"></div>
<div class="-b1 -bSuccess"></div>
<div class="-b1 -bDanger"></div>
<div class="-b1 -bInfo"></div>
<div class="-b1 -bWarning"></div>
<div class="-b1 -bDark"></div>
<div class="-b1 -bLight"></div>