border-width
A shorthand for setting the thickness of all four borders. You can provide 1, 2, 3, or 4 values to target different sides specifically.
It is documented as part of the CSS Backgrounds and Borders specification.
Syntax
/* Usage Example */
.box {
/* top | right | bottom | left */
border-width: 2px 5px 2px 5px;
border-style: solid;
border-color: #333;
}
/* Global values */
border-width: inherit;
border-width: initial;
border-width: revert;
border-width: revert-layer;
border-width: unset;
border-width Browser support
Widely available
Since
2015 96% global usage
This feature is well established and works across many devices and browser versions. It has been available across browsers since 2015.
1+
1+
1+
12+