CSS border-inline-color Property

Beginner
5 min read
Updated: Oct 2026
3 examples
Live preview

Definition and Usage

The border-inline-color property sets the color of an element’s logical inline-start and inline-end borders. In the default horizontal writing mode, that means the left and right border colors.

One color paints both sides. Two colors set start first and end second. It maps to physical sides based on writing-mode and direction. For the other axis, use border-block-color.

Baseline · Widely available.

Not deprecated and not experimental. Logical border color properties have been widely available across browsers since April 2021. Internet Explorer does not support them.

CSS Syntax

syntax.css
border-inline-color: <color> | <color> <color> | initial | inherit;

The initial value is currentColor. You still need a visible border-inline-style and width for the color to show.

Property Values

ValueDescriptionTry it
<color>One color for both inline sidesTry it
<color> <color>First = inline-start, second = inline-endTry it
currentColorUses the element’s text color. Initial valueTry it
transparentInvisible border color; width still takes spaceTry it
With writing-modePhysical edges change when writing mode is verticalTry it
initialResets to currentColorTry it
inheritInherits this property from the parent elementTry it

How to Use border-inline-color

Give the inline borders a style and width first, then set their color.

  1. Set a visible inline border, for example border-inline: 4px solid; or separate width and style.
  2. Add border-inline-color with one color for both sides, or two colors for start and end.
  3. Leave the block sides alone, or color them with border-block-color.
  4. Remember: without a style other than none, the color will not show.
PieceRequired?Role
Border styleYes (to show a line)solid, dashed, and so on
Border widthYes (to see color)Zero width hides the color
One or two colorsYesOne = both sides; two = start then end
writing-modeOptionalChanges which physical edges get the colors

Live Preview

The box already has a solid 4px inline border. Change only border-inline-color.

Two values color inline-start first and inline-end second. Style and width stay fixed.

Box

border-inline-color: #2563eb

CSS Examples

Each snippet focuses on border-inline-color. Style and width are only there so the color can show. Use Try It Yourself for a live editor.

Example 1 — One Color on Both Sides

Paint inline-start and inline-end with the same blue.

CSS
<style>
  div {
    border-inline: 4px solid;
    border-inline-color: #2563eb;
    padding: 12px;
  }
</style>

<div>Same color on both inline sides</div>
Try It Yourself

How It Works

  1. Draw the inline borders. border-inline: 4px solid sets width and style on both inline sides.
  2. Set one color. border-inline-color: #2563eb paints start and end the same.
  3. Leave block sides alone. Top and bottom stay without a border in this snippet.
  4. Map to physical edges. In horizontal text, you see blue on left and right.

Example 2 — Two Different Colors

First color is inline-start. Second color is inline-end.

CSS
<style>
  div {
    border-inline: 4px solid;
    border-inline-color: #2563eb #0f766e;
    padding: 12px;
  }
</style>

<div>Blue start, teal end</div>
Try It Yourself

How It Works

  1. Keep a visible border. Width and style still come from border-inline.
  2. Pass two colors. The first value colors inline-start.
  3. Second value colors inline-end. Here that is teal on the right in horizontal LTR text.
  4. Same property, two jobs. You do not need separate start/end color longhands for this pattern.

Example 3 — currentColor

Let the border follow the text color.

CSS
<style>
  div {
    color: #7c3aed;
    border-inline: 4px solid;
    border-inline-color: currentColor;
    padding: 12px;
  }
</style>

<div>Border matches text color</div>
Try It Yourself

How It Works

  1. Set the text color. color: #7c3aed is what currentColor reads.
  2. Draw the inline borders. Style and width are still required.
  3. Point color at the text. border-inline-color: currentColor copies that purple.
  4. Initial behavior. If you omit border-inline-color, browsers already use currentColor by default.

Edge Cases & Pitfalls

If the color seems missing, check these first.

style

Color needs a visible style

border-inline-color alone never draws a line. Add border-inline-style (or a border-inline shorthand with a style).

width

Zero width hides the color

A border with 0 width has nowhere to show the color. Set a positive border-inline-width.

order

Two values are start then end

border-inline-color: blue green means blue on inline-start and green on inline-end. Swap them if the wrong edge looks wrong.

shorthand

border-inline can overwrite color

Writing border-inline: 4px solid red after your color rule replaces it. Put border-inline-color after the shorthand, or include the color in the shorthand.

axis

Block sides need another property

This property never colors top/bottom in horizontal text. Use border-block-color for the block axis.

Browser Support

border-inline-color is a browser CSS property for logical border colors. Node.js, Deno, and Bun do not apply it.

✓ Baseline · Widely available

border-inline-color

Chrome 87+, Edge 87+, Firefox 66+, Safari 14.1+. Internet Explorer has no support.

97% Modern browser support
Google Chrome 87+
Full support
Mozilla Firefox 66+
Full support
Apple Safari 14.1+
Full support
Microsoft Edge 87+
Full support
Opera 73+
Full support
Samsung Internet 14+
Full support
Internet Explorer No support
Not supported
border-inline-color Widely supported

Bottom line: Safe for modern browsers. Fall back to border-left-color and border-right-color only when you must support Internet Explorer. It is not a runtime API.

Key Takeaways

  • Role: color the logical inline-start and inline-end borders.
  • One or two colors: one for both sides; two for start then end.
  • Needs a line: style and width must exist before color is visible.
  • Initial value: currentColor. Not inherited. Follows writing mode.

One line: visible inline border + border-inline-color: blue green; = colored start and end on the inline axis.

Frequently Asked Questions

It sets the color of the logical inline-start and inline-end borders. In horizontal writing those are usually the left and right border colors.
The initial value is currentColor, which uses the element’s text color for both inline borders.
Yes. One color paints both sides. Two colors set inline-start first and inline-end second, for example border-inline-color: blue green.
Color alone does not draw a border. You also need a visible style such as solid and a width greater than zero.
border-left-color always targets the physical left side. border-inline-color follows writing-mode and direction, so the same rule works in LTR, RTL, and vertical layouts.
It is Baseline Widely available. Chrome 87+, Edge 87+, Firefox 66+, and Safari 14.1+ support it. Internet Explorer does not. It is a browser CSS property, not a Node.js feature.

Next: border-inline-end

Set width, style, and color on only the inline-end edge.

border-inline-end tutorial →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

8 people found this page helpful