CKTIS / CSS
border-block-end: draw the boundary after the block
Style a single logical end edge, which can be the bottom, left or right depending on writing-mode.
Version: CSS Modules
Syntax
border-block-end: 6px dashed red;border-block-end combines width, style and color for the edge at the end of block progression. It is the bottom edge in horizontal-tb, the left in vertical-rl and the right in vertical-lr. In these modes, direction: rtl changes inline progression rather than moving this block-end edge. A divider following a paragraph or section can therefore follow its writing mode without choosing a fixed border-bottom. The shorthand does not change block-start or the two inline edges.
Omitted width, style and color components are reset to their initial values; the color defaults to currentColor. If you omit the style, none prevents a visible line even when a length is supplied. A physical property can target the very same edge: in vertical-rl, border-left and border-block-end compete through the ordinary cascade, not through a special priority for logical properties. Use one coordinate system consistently when possible; when combining them, inspect both the cascade and the element’s writing mode.
Each sample has an 80×40 content area and an initial 1px border on all sides. Replacing only the end with 6px dashed red produces 82×47 in horizontal writing and 87×42 in either vertical mode. The vertical-rl result stays the same with rtl. A separate vertical-rl box receives a later border-left of 2px, and its logical end consequently reads 2px. Removing and re-appending the logical shorthand as 4px solid makes the left edge 4px solid blue, taken from color: blue; the opposite block-start remains 1px.
Examples
const make=(mode,direction='ltr')=>{const el=document.createElement('div');el.style.cssText='width:80px;height:40px;box-sizing:content-box;padding:0;color:blue;border:1px solid black;border-block-end:6px dashed red';el.style.writingMode=mode;el.style.direction=direction;document.body.append(el);return el};
const read=(label,el)=>{const s=getComputedStyle(el),r=el.getBoundingClientRect();console.log(label+'='+[s.borderTopWidth,s.borderRightWidth,s.borderBottomWidth,s.borderLeftWidth].join(',')+'; box='+r.width+'x'+r.height)};
read('horizontal',make('horizontal-tb'));read('vertical-rl',make('vertical-rl'));read('vertical-lr',make('vertical-lr'));read('vertical-rl/rtl',make('vertical-rl','rtl'));
const conflict=make('vertical-rl');conflict.style.borderLeft='2px solid green';console.log('physical-later='+getComputedStyle(conflict).borderBlockEndWidth);conflict.style.removeProperty('border-block-end');conflict.style.borderBlockEnd='4px solid';const s=getComputedStyle(conflict);console.log('logical-later='+s.borderLeftWidth+','+s.borderLeftStyle+','+s.borderLeftColor+'; start='+s.borderRightWidth);Result
horizontal=1px,1px,6px,1px; box=82x47 vertical-rl=1px,1px,1px,6px; box=87x42 vertical-lr=1px,6px,1px,1px; box=87x42 vertical-rl/rtl=1px,1px,1px,6px; box=87x42 physical-later=2px logical-later=4px,solid,rgb(0, 0, 255); start=1px
Executed in Chromium 157.0.8103.51. The cascade comparison uses declarations in the same inline style, so later order is decisive here; it does not override origin, importance, layers or specificity in other stylesheet arrangements.