border-block-color
Widely availableSince 202197% of users
Sets the color of the borders in the block dimension (top and bottom in horizontal text). It's a logical way to style both 'vertical' ends of a box at once.
What's modern
From web-features, MDN's browser data and our snippets, checked dailyModernIn every major browser since April 2021. Widely available since October 2023.
See how modern your own CSS is.Check your CSS →
Quick facts
- Initial value
currentcolor- Inherited
- No
- Applies to
- all elements
- Animation type
- byComputedValueType
Quick example
.sidebar-item {
/* Sets both top and bottom borders to purple */
border-block-color: #7c3aed;
border-block-style: solid;
border-block-width: 2px;
}Values
border-top-colorborder-block-color browser support
BaselineWidely availableThis feature is well established and works across many devices and browser versions. It has been available across browsers since 2021.Safe to use without fallbacks.
Usage97%of people can use this3% use a browser without it.
Browsers
87+
66+
14.1+
87+Mobile
87+Android
66+Android
14.5+iOS