Knowledge baseExam Center
ENEnglish
Choose language13

CKTIS / CSS

border-inline-end-color — color of the inline-end border

The border-inline-end-color property sets the border color at the end of the inline axis. Unlike border-right-color, it targets a logical side determined by the writing direction and writing mode.

Version: CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required

Syntax

border-inline-end-color: <color>;
/* CSS Borders Level 4 draft additionally defines <image-1D>. */
border-inline-end-color: inherit | initial | unset | revert | revert-layer;

border-inline-end-color changes the color of one logical border edge. With writing-mode: horizontal-tb, this is the right edge for direction: ltr and the left edge for direction: rtl. In general, mapping depends on writing-mode, direction, and text-orientation; it does not always mean the right side.

The initial value is currentcolor, meaning the color supplied by the element’s color. The property is not inherited. Color alone does not create a visible border: a suitable style, such as solid, and a nonzero width are also needed. The border shorthand can reset this color, so it appears before the logical declaration in the example.

For ordinary use, supply a <color>, such as #0000ff, transparent, or currentcolor. The CSS Borders Level 4 draft additionally defines <image-1D>; do not treat that syntax as confirmed support in the target browser. The example uses only a color and demonstrates the side changing with direction.

Examples

<!doctype html>
<meta charset="utf-8">
<title>border-inline-end-color</title>
<style>
  .box {
    writing-mode: horizontal-tb;
    margin: 12px;
    padding: 8px;
    border: 4px solid #808080;
    border-inline-end-color: #0000ff;
  }
  .ltr { direction: ltr; }
  .rtl { direction: rtl; }
</style>
<div class="box ltr">LTR</div>
<div class="box rtl">RTL</div>

Result

LTR: right border #0000ff; other borders #808080.
RTL: left border #0000ff; other borders #808080.

The displayed code and declared result were verified in an isolated environment using the method recorded in the verification evidence for this exact version.

Sources