CKTIS / CSS
border-block-width — border thickness on the block axis
border-block-width sets border thickness at the start and end of the block axis. One value applies to both edges; two values specify start and end respectively. Their physical positions depend on the writing mode.
Version: CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
Syntax
border-block-width: <'border-top-width'>{1,2};border-block-width is shorthand for border-block-start-width and border-block-end-width. One value sets both thicknesses; two values set block start and block end respectively. It does not change border color, style, or inline-axis border widths.
In horizontal-tb, these are the top and bottom edges; in vertical-rl, they are right and left. Unlike border-width, this property accepts at most two values and describes logical edges, not four physical sides.
Use nonnegative lengths such as 2px, or thin, medium, and thick. Percentages and negative values are invalid. The current Level 4 draft also adds hairline; do not assume support without separate verification. CSS-wide keywords such as inherit and initial are also available.
The longhands are not inherited and initially have medium widths. Thickness alone does not display an ordinary border: also set a style such as border-block-style: solid; with none or hidden, the width is zero. The example checks edge mapping before and after changing writing-mode.
Examples
const box = document.createElement('div');
box.textContent = 'Block borders';
box.style.cssText = 'writing-mode: horizontal-tb; border-block-style: solid; border-block-width: 2px 6px;';
document.body.append(box);
const horizontal = getComputedStyle(box);
console.log(horizontal.borderTopWidth, horizontal.borderBottomWidth);
box.style.writingMode = 'vertical-rl';
const vertical = getComputedStyle(box);
console.log(vertical.borderRightWidth, vertical.borderLeftWidth);
box.remove();Result
2px 6px 2px 6px
The displayed code and declared result were verified in an isolated environment using the method recorded in the verification evidence for this exact version.