CSS Portal

CSS border-inline-color Property

If this site has been useful, we’d love your support! Consider buying us a coffee to keep things going strong!

Description

The CSS property border-inline-color controls the color applied to an element’s inline-axis borders - that is, the borders that lie on the inline-start and inline-end edges of the box. As a logical property, it abstracts away physical directions (left/right) so authors can set the inline-edge color without worrying about writing direction. This makes it especially useful in multi-lingual or rotated layouts where the inline axis may not correspond to the left/right edges of the screen.

Because it’s a logical shorthand for the two inline-edge colors, the value of border-inline-color maps onto the more specific properties for each inline edge (for example, border-inline-start-color and border-inline-end-color). How those inline edges correspond to physical sides depends on the element’s text orientation and direction settings (see writing-mode and direction). Changing the writing mode or direction can therefore change which physical sides are affected, without changing the logical declaration.

In the cascade, border-inline-color participates alongside other border properties: a more specific per-edge property or a later declaration of the shorthand border-color (or the overall border-style and width declarations) can override it. Its computed color is often resolved relative to the element’s foreground color, so it commonly interacts with the text color used on the element. Note that a border will only be visible if a non-none border style and a non-zero border width are present.

Practically, authors use border-inline-color to make layouts and components adapt to different writing systems and directions without duplicating rules for left/right. It’s useful in theming and dynamic UIs where swapping themes or flipping text direction should change which sides receive a particular border color automatically. Because it targets only color, it’s also convenient when you want to animate or transition border hues independently of side-specific widths or styles and when you want a clear separation between color and other border characteristics.

Definition

Initial value
currentcolor
Applies to
all elements
Inherited
no
Computed value
computed color
Animatable
by computed value type
JavaScript syntax
object.style.borderInlineColor

Interactive Demo

Example of the Border
Inline Color Property

Syntax

border-inline-color: <color>

Values

  • <color>Specifies the color of the border

Example

<div class='container'>
<p class='box ltr'>LTR - border-inline-color: crimson limegreen;</p>
<p class='box rtl' dir='rtl'>RTL - border-inline-color: crimson limegreen;</p>
</div>
.container {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
}

.box {
  padding: 1rem;
  border-style: solid;
  border-width: 4px;
  border-inline-color: crimson limegreen;
  border-block-color: transparent;
  min-width: 200px;
  text-align: center;
}

.box.ltr {
  writing-mode: horizontal-tb;
  direction: ltr;
}

.box.rtl {
  writing-mode: horizontal-tb;
  direction: rtl;
}

Browser Support

The following information will show you the current browser support for the CSS border-inline-color property. Hover over a browser icon to see the version that first introduced support for this CSS property.

This property is supported by all modern browsers.
Desktop
Chrome
Edge
Firefox
Opera
Safari
Tablets & Mobile
Chrome Android
Firefox Android
Opera Android
Safari iOS
Samsung Internet
Android WebView
-

Last updated by CSSPortal on: 1st January 2026

If this site has been useful, we’d love your support! Consider buying us a coffee to keep things going strong!