CKTIS / CSS
border-block-start-color: color the block’s starting edge
Change a logical border’s paint without changing its thickness or the space it occupies.
Version: CSS Modules
Syntax
border-block-start-color: <color>;border-block-start-color selects the color of the starting edge on the block axis: top in horizontal-tb, right in vertical-rl and left in vertical-lr. Its initial value currentColor uses the element’s color property. It is not inherited by default, although color itself normally inherits, so a border can indirectly follow text color from an ancestor.
The color does not create a border when its style is none or hidden, nor does it alter the width. transparent makes the border’s paint transparent while retaining its space if the style and width still produce a border. This differs from setting the border style to none, which makes its computed width zero. Choose an appropriate style and width separately, or use border-block-start to set all three components.
The example gives a 100×40 content box an 8px solid start border using currentColor. Its computed border color initially follows rgb(20, 40, 60), then changes to rgb(100, 120, 140) when only color changes. Both states have outer size 100×48. Setting transparent leaves that geometry intact and serializes the color as rgba(0, 0, 0, 0).
With vertical-lr, the transparent start edge moves to the left and the outer size becomes 108×40. Setting its style to none returns the size to 100×40 and the computed width to 0px. These measurements separate color from layout; they do not mean a transparent border is a visible separator. If a separator conveys meaning, provide adequate contrast and avoid relying on color alone.
Examples
const box=document.createElement('div');
box.style.cssText='width:100px;height:40px;padding:0;border:0 solid;box-sizing:content-box;border-block-start-width:8px;border-block-start-color:currentColor;color:rgb(20,40,60)';
document.body.append(box);
const read=()=>{const s=getComputedStyle(box),r=box.getBoundingClientRect();return [s.borderBlockStartColor,s.borderBlockStartWidth,r.width,r.height].join('|')};
const first=read();box.style.color='rgb(100,120,140)';const follows=read();
box.style.borderBlockStartColor='transparent';const transparent=read();
box.style.writingMode='vertical-lr';const vertical=read();
box.style.borderBlockStartStyle='none';const none=read();
console.log('current='+first+'; follows='+follows+'; transparent='+transparent+'; vertical='+vertical+'; none='+none);Result
current=rgb(20, 40, 60)|8px|100|48; follows=rgb(100, 120, 140)|8px|100|48; transparent=rgba(0, 0, 0, 0)|8px|100|48; vertical=rgba(0, 0, 0, 0)|8px|108|40; none=rgba(0, 0, 0, 0)|0px|100|40
Executed in Chromium 157.0.8103.51 with actual computed colors and box geometry. The test does not assess contrast or screenshot pixel colors.