CKTIS / CSS
border-block-start-style: choose the line, or remove its width
Select a border pattern on the block-start edge and understand why none and hidden also affect layout.
Version: CSS Modules
Syntax
border-block-start-style: <line-style>; /* one value */border-block-start-style controls the line style of one logical edge. Common values include solid, dashed, dotted and double; groove, ridge, inset and outset create relief-like treatments. The edge follows writing-mode: top in horizontal-tb and right in vertical-rl. Unlike border-block-style, this single-edge property does not accept a pair of styles.
The initial style is none. Both none and hidden suppress the border and make its computed width zero, even if a nonzero width has been specified. In a collapsed-border table, hidden and none have different conflict-resolution behavior; they are not interchangeable there. The example uses ordinary block boxes, so it tests their equal zero-width result outside collapsed table borders.
The test specifies a 6px start width on a 100×40 content box and cycles through none, solid, double and hidden. Measured outer heights are 40,46,46,40, while computed start widths are 0,6,6,0px. double uses the specified total border thickness for its two lines and the gap, rather than drawing two separate 6px borders. With vertical-rl and dashed, the 6px border moves to the right and the outer size is 106×40.
A style declaration does not set a chosen color or numeric width. For a visible result, check those values and any later border shorthand that may reset them. Exact dash placement and relief shading are rendering details, not measured here. Avoid using line style as the only way to communicate a critical state.
Examples
const box=document.createElement('div');
box.style.cssText='width:100px;height:40px;padding:0;border:0;box-sizing:content-box;border-block-start-width:6px;border-block-start-color:red';
document.body.append(box);
const sample=value=>{box.style.borderBlockStartStyle=value;const s=getComputedStyle(box),r=box.getBoundingClientRect();return [s.borderBlockStartStyle,s.borderBlockStartWidth,r.width,r.height].join(',')};
const states=['none','solid','double','hidden'].map(sample).join('|');
box.style.writingMode='vertical-rl';const vertical=sample('dashed');
console.log('states='+states+'; vertical='+vertical+'; twoStyles='+CSS.supports('border-block-start-style','solid dashed'));Result
states=none,0px,100,40|solid,6px,100,46|double,6px,100,46|hidden,0px,100,40; vertical=dashed,6px,106,40; twoStyles=false
Executed in Chromium 157.0.8103.51. The example verifies computed style and geometry, not the raster pattern of individual dashes or collapsed-table conflict resolution.