CKTIS / CSS
border-block-end-color: color one logical edge
Change the block-end border color, including currentColor and transparent, without resetting its line style or width.
Version: CSS Modules
Syntax
border-block-end-color: currentColor;border-block-end-color changes only the end edge’s color. It targets bottom in horizontal-tb, left in vertical-rl and right in vertical-lr; it does not mean the end of a text line. The color is not inherited as a border property, but its initial currentColor follows the color value on the element, which may itself be inherited. An explicit currentColor remains linked to later changes of that element’s color. A fixed blue value would not follow a later green text color.
Color alone neither creates a line whose style is none nor removes the space occupied by a styled border. transparent makes the chosen color fully transparent while preserving its border width. For layout removal, changing the corresponding border style to none has a different effect: its used width becomes zero. Re-evaluating writing-mode remaps the logical declaration; the color is not permanently attached to the physical side that happened to be used first. A physical color declaration can still compete with it in the cascade.
The example starts with a 70×30 content box and 2px gray borders. With vertical-rl and rtl, currentColor makes the left border green; changing color to blue makes that same edge blue. Switching writing-mode to vertical-lr restores gray on the left and moves blue to the right. Setting the logical end color to transparent retains the 74×34 border box and the 2px end width. Setting its style to none then reduces that width to 0px and the overall box to 72×34. These are computed colors and actual geometry, not a screenshot-based guess.
Examples
const el=document.createElement('div');el.style.cssText='writing-mode:vertical-rl;direction:rtl;width:70px;height:30px;box-sizing:content-box;padding:0;border:2px solid gray;color:green;border-block-end-color:currentColor';document.body.append(el);
const read=label=>{const s=getComputedStyle(el),r=el.getBoundingClientRect();console.log(label+'='+s.borderLeftColor+'|'+s.borderRightColor+'; end='+s.borderBlockEndWidth+'; box='+r.width+'x'+r.height)};
read('green-left');el.style.color='blue';read('blue-left');el.style.writingMode='vertical-lr';read('blue-right');el.style.borderBlockEndColor='transparent';read('transparent');el.style.borderBlockEndStyle='none';read('none');Result
green-left=rgb(0, 128, 0)|rgb(128, 128, 128); end=2px; box=74x34 blue-left=rgb(0, 0, 255)|rgb(128, 128, 128); end=2px; box=74x34 blue-right=rgb(128, 128, 128)|rgb(0, 0, 255); end=2px; box=74x34 transparent=rgb(128, 128, 128)|rgba(0, 0, 0, 0); end=2px; box=74x34 none=rgb(128, 128, 128)|rgba(0, 0, 0, 0); end=0px; box=72x34
Executed in Chromium 157.0.8103.51 for ordinary color values. The sample does not establish support for newer CSS Borders Level 4 color-value extensions or test forced-colors overrides and border-image painting.