The border-inline-color property sets the color of borders on the inline-start and inline-end sides of an element.
01
Logical
Follows text flow.
02
One Color
Both inline sides.
03
Two Colors
Start and end.
04
Color Formats
Hex, rgb, hsl.
05
Longhand
Part of border-inline.
06
RTL Ready
Direction-aware.
Fundamentals
Definition and Usage
The border-inline-color CSS property sets the color of borders along the inline axis — on inline-start and inline-end. It is a longhand of the border-inline shorthand and works with logical properties that adapt to writing mode and text direction.
Unlike border-left-color and border-right-color, which always target physical sides, border-inline-color keeps your color rules correct in both LTR and RTL layouts. You can set one color for both inline sides or two colors for start and end.
💡
Beginner Tip
border-inline-color only sets color. Pair it with border-inline-width and border-inline-style, or use the border-inline shorthand first and override the color separately.
Foundation
📝 Syntax
border-inline-color accepts one or two color values:
syntax.css
/* one color for both inline sides */selector{border-inline-color:color;}/* start color and end color */selector{border-inline-color:start-color end-color;}
One color applies to both inline-start and inline-end.
Two colors set inline-start first, then inline-end.
Any valid CSS color value works: named colors, hex, rgb, hsl, currentcolor, transparent.
You need a visible border width and style for the color to appear.
The mapped physical sides change with direction and writing-mode.
Cheat Sheet
⚡ Quick Reference
Question
Answer
Initial value
currentcolor
Applies to
Inline-start and inline-end border colors
Inherited
No
Animatable
Yes, as a color
Common use
Direction-aware accent borders, start/end color cues
Defaults
Default Value
The default value of border-inline-color is currentcolor. That means inline borders use the element’s text color unless you set a different color explicitly.
With border-inline-color: green blue, green always applies to inline-start and blue to inline-end — regardless of whether inline-start is on the left or right.
LTR (direction: ltr)
Green start, blue end
RTL (direction: rtl)
Green start, blue end
Compare
border-inline-color vs related properties
Property
Targets
Best for
border-inline-color
Color on inline-start and inline-end
Direction-aware side border colors
border-inline
Width, style, and color together
Setting full inline borders in one rule
border-left-color / border-right-color
Physical left and right colors
Fixed LTR-only layouts
border-color
All four physical sides
Full box border coloring
Preview
👀 Live Preview
A box with green on inline-start and blue on inline-end:
Green start border, blue end border.
Uses border-inline-color: #059669 #2563eb; with a 4px solid inline border.
Hands-On
Examples Gallery
Try border-inline-color with start/end colors, a single color, currentcolor, and RTL text.
📚 Start and End Colors
Set different colors on inline-start and inline-end.
Example 1 — Green Start, Blue End
Set green on inline-start and blue on inline-end, matching the reference tutorial.
border-inline-color-dual.html
<style>div{border-inline-width:4px;border-inline-style:solid;border-inline-color:green blue;padding:0.75rem 1rem;}</style><div>
Green border on start, blue border on end.
</div>
The first color (green) applies to inline-start and the second (blue) to inline-end. In LTR horizontal text, you usually see green on the left and blue on the right.
Example 2 — One Color on Both Sides
Use a single color value to style both inline borders the same way.
Green still applies to inline-start and blue to inline-end. In RTL, inline-start is on the right, so the colors swap physically but stay correct logically.
🧠 How border-inline-color Works
1
Inline borders exist
Width and style must be set so inline borders can be painted.
Setup
2
Colors are assigned
border-inline-color sets start and/or end border colors.
Color
3
Direction maps the sides
Inline-start and inline-end map to the correct physical sides for LTR or RTL.
Mapping
=
🎨
Colored inline borders
Your element shows direction-aware colored borders on both inline sides.
Compatibility
Modern Browser Support
The border-inline-color property is supported in all modern browsers, including Chrome, Firefox, Safari, Edge, and Opera.
✓ Baseline · Modern browsers
Logical inline border colors in today’s browsers
Chrome, Edge, Firefox, Safari, and Opera support border-inline-color in LTR and RTL layouts.
94%Modern browser support
Google Chrome87+ · Desktop & Mobile
Full support
Mozilla Firefox66+ · Desktop & Mobile
Full support
Apple Safari14.1+ · macOS & iOS
Full support
Microsoft Edge87+ · All versions
Full support
Opera73+ · Modern versions
Full support
border-inline-color property94% supported
Bottom line: Use border-inline-color for direction-aware side border colors in modern multilingual projects.
Wrap Up
Conclusion
The border-inline-color property gives you precise, direction-aware control over inline border colors. Use one color for both sides or two colors to distinguish inline-start from inline-end in multilingual layouts.
Pair it with inline border width and style, and prefer logical colors over physical left/right rules when text direction may change.
Set border-inline-width and border-inline-style before expecting colors to show
Use two colors to visually distinguish inline-start from inline-end
Prefer logical colors in RTL and multilingual interfaces
Use currentcolor to keep borders synced with text color
Test color combinations in both LTR and RTL
❌ Don’t
Assume inline-start is always the physical left side
Set color alone without a visible border width and style
Mix conflicting physical and logical border color rules
Use low-contrast start/end colors that hurt readability
Hard-code RTL color overrides when one logical rule suffices
Summary
Key Takeaways
Knowledge Unlocked
Five things to remember about border-inline-color
Use these points when coloring logical inline borders.
5
Core concepts
🎨01
Inline colors
Start and end.
Purpose
⚡02
currentcolor
Default value.
Default
🔴03
Two values
Start vs end.
Syntax
🌐04
RTL ready
Direction-aware.
Logical
🛠05
Needs width
Color only.
Usage
❓ Frequently Asked Questions
The border-inline-color property sets the color of borders on the inline-start and inline-end sides of an element — the sides along the text flow direction.
The initial value is currentcolor, which uses the element's text color for the inline borders.
Yes. With two values, the first color applies to inline-start and the second to inline-end, for example border-inline-color: green blue.
border-inline-color only sets color. You also need a visible border-inline-style such as solid and a border-inline-width greater than zero.
border-left-color always targets the physical left side. border-inline-color follows writing direction, so the same rule works in LTR and RTL layouts.