The border-inline-end-color property sets the color of the border on the inline-end side only.
01
Inline-End
Trailing side color.
02
Longhand
Color only.
03
LTR / RTL
Direction-aware.
04
Color Formats
Hex, rgb, hsl.
05
currentcolor
Matches text.
06
Logical
Not right-color.
Fundamentals
Definition and Usage
The border-inline-end-color CSS property sets the color of the border on the inline-end side of an element. It is a longhand of border-inline-end and part of CSS logical properties that adapt to writing mode and text direction.
Unlike border-right-color, which always targets the physical right side, border-inline-end-color follows the text flow. In LTR horizontal text, inline-end is usually the right side; in RTL, it is usually the left.
💡
Beginner Tip
border-inline-end-color only sets color. Pair it with a border width and style — for example border: 2px solid; — so the inline-end border is visible.
Foundation
📝 Syntax
border-inline-end-color accepts any valid CSS color value:
Accepts named colors, hex, rgb, hsl, currentcolor, and transparent.
Only affects the inline-end border side; other sides keep their own colors.
You need a visible border width and style for the color to appear.
The physical side mapped to inline-end depends on direction and writing-mode.
Default is currentcolor, matching the element’s text color.
Cheat Sheet
⚡ Quick Reference
Question
Answer
Initial value
currentcolor
Applies to
Inline-end border color only
Inherited
No
Animatable
Yes, as a color
Common use
Trailing edge accents, RTL-safe end borders
Defaults
Default Value
The default value of border-inline-end-color is currentcolor. The inline-end border uses the element’s text color unless you set a different color explicitly.
Reference
💎 Property Values
Value
Example
Meaning
Named color
border-inline-end-color: red;
Uses a CSS color keyword on inline-end
Hex
border-inline-end-color: #2563eb;
Hexadecimal color on the inline-end side
HSL
border-inline-end-color: hsl(142, 71%, 45%);
HSL functional notation
currentcolor
border-inline-end-color: currentcolor;
Matches the element’s text color
transparent
border-inline-end-color: transparent;
Makes the inline-end border invisible
red
#2563eb
hsl
Common Value Types
rednamed color
#2563ebhex value
currentcolormatches text
Scope
Inline-End Color and Writing Modes
border-inline-end-color always targets the end of the inline axis. The physical side changes with text direction, but the logical meaning stays the same.
LTR (direction: ltr)
Red inline-end (usually right)
RTL (direction: rtl)
Red inline-end (usually left)
Compare
border-inline-end-color vs related properties
Property
Targets
Best for
border-inline-end-color
Color on inline-end only
Trailing edge accent color in logical layouts
border-inline-end
Width, style, and color on inline-end
Setting the full inline-end border in one rule
border-inline-color
Colors on both inline sides
Start and end colors together
border-right-color
Physical right side color
Fixed LTR-only layouts
Preview
👀 Live Preview
A box with a red inline-end border on a gray frame:
Red border on the inline-end side.
Uses border: 3px solid #cbd5e1; and border-inline-end-color: #dc2626;.
Hands-On
Examples Gallery
Try border-inline-end-color with named colors, hex values, currentcolor, and RTL text.
📚 Basic End Border Colors
Color only the trailing inline border side.
Example 1 — Red Inline-End Border
Set the inline-end border color to red, matching the reference tutorial.
border-inline-end-color-red.html
<style>.box{border:2px solid;border-inline-end-color:red;padding:0.75rem 1rem;}</style><divclass="box">
This box has an inline-end border color of red.
</div>
border: 2px solid gives all sides a visible border. border-inline-end-color: red overrides only the trailing inline side. In LTR, that is usually the right edge.
Example 2 — Hex Color on Inline-End
Use a hex color for the end border while keeping other sides neutral gray.
currentcolor is the default value. Here it makes the inline-end border purple to match the text while other sides stay gray.
Example 4 — RTL Layout
The same inline-end color rule adapts when text direction is right-to-left.
border-inline-end-color-rtl.html
<style>.rtl-box{direction:rtl;border:3px solid #cbd5e1;border-inline-end-color:#059669;padding:0.75rem 1rem;background:#ecfdf5;}</style><divclass="rtl-box">
لون الحد المنطقي النهائي
</div>
Green still applies to inline-end. In RTL, inline-end is on the left, so you do not need a separate border-left-color rule.
🧠 How border-inline-end-color Works
1
Border exists on inline-end
A width and style must be set so the inline-end border can be painted.
Setup
2
Color is applied
border-inline-end-color sets the trailing inline border color.
Color
3
Direction maps the side
Inline-end maps to the correct physical side for LTR or RTL.
Mapping
=
🎨
Colored end border
Only the trailing inline edge shows your chosen color.
Compatibility
Modern Browser Support
The border-inline-end-color property is supported in all modern browsers, including Chrome, Firefox, Safari, Edge, and Opera.
✓ Baseline · Modern browsers
Logical inline-end colors in today’s browsers
Chrome, Edge, Firefox, Safari, and Opera support border-inline-end-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-end-color property94% supported
Bottom line: Use border-inline-end-color for direction-aware trailing border colors in modern multilingual projects.
Wrap Up
Conclusion
The border-inline-end-color property gives you precise control over the color of the trailing inline border. Use it when only the end edge needs a different color in LTR or RTL layouts.
Pair it with border width and style, and prefer this logical longhand over border-right-color when text direction may change.
Set border width and style before expecting color to show
Use border-inline-end-color for trailing edge accents in RTL layouts
Prefer logical colors over border-right-color when direction may change
Use currentcolor to sync the end border with text color
Test end border colors in both LTR and RTL
❌ Don’t
Assume inline-end is always the physical right side
Set color alone without a visible border width and style
Mix conflicting border-right-color and logical end color rules
Use low-contrast end border colors that hurt readability
Hard-code RTL overrides when one logical rule suffices
Summary
Key Takeaways
Knowledge Unlocked
Five things to remember about border-inline-end-color
Use these points when coloring the trailing inline border.
5
Core concepts
🎨01
End color only
Trailing side.
Purpose
⚡02
currentcolor
Default value.
Default
🔴03
Any CSS color
Hex, rgb, hsl.
Values
🌐04
RTL ready
Direction-aware.
Logical
🛠05
Needs width
Color longhand.
Usage
❓ Frequently Asked Questions
The border-inline-end-color property sets the color of the border on the inline-end side only — the trailing edge along the text flow direction.
The initial value is currentcolor, which uses the element's text color for the inline-end border.
In horizontal left-to-right text, inline-end is usually the right side. In RTL, inline-end is usually the left side.
border-inline-end-color only sets color. You also need a visible border width and style on that side, or use a shorthand like border: 2px solid.
border-right-color always targets the physical right side. border-inline-end-color follows writing direction, so the same rule works in LTR and RTL layouts.