The border-left-color property sets the color of the border on the physical left side only.
01
Left Side
Physical color.
02
Longhand
Color only.
03
Color Formats
Hex, rgb, hsl.
04
currentcolor
Matches text.
05
Override
Recolor left only.
06
Classic CSS
Universal support.
Fundamentals
Definition and Usage
The border-left-color CSS property sets the color of the border on the physical left side of an element. It is a longhand of border-left and works alongside border-left-width and border-left-style.
Unlike logical properties such as border-inline-start-color, border-left-color always targets the physical left edge — even in RTL text. That makes it straightforward for classic LTR layouts and left accent dividers.
💡
Beginner Tip
border-left-color only sets color. Pair it with a visible border width and style, or use border: 5px solid black; plus this longhand to recolor only the left side.
Foundation
📝 Syntax
border-left-color accepts any valid CSS color value:
Accepts named colors, hex, rgb, hsl, currentcolor, and transparent.
Only affects the left border side; other sides keep their own colors.
You need a visible border width and style for the color to appear.
Always affects the physical left side, regardless of direction or writing-mode.
Default is currentcolor, matching the element’s text color.
Cheat Sheet
⚡ Quick Reference
Question
Answer
Initial value
currentcolor
Applies to
Left border color only
Inherited
No
Animatable
Yes, as a color
Common use
Quote bar accents, left edge highlights, recoloring one side
Defaults
Default Value
The default value of border-left-color is currentcolor. The left border uses the element’s text color unless you set a different color explicitly.
Reference
💎 Property Values
Value
Example
Meaning
Named color
border-left-color: green;
Uses a CSS color keyword on the left side
Hex
border-left-color: #2563eb;
Hexadecimal color on the physical left side
HSL
border-left-color: hsl(142, 71%, 45%);
HSL functional notation
currentcolor
border-left-color: currentcolor;
Matches the element’s text color
transparent
border-left-color: transparent;
Makes the left border invisible
green
#2563eb
hsl
Common Value Types
greennamed color
#2563ebhex value
currentcolormatches text
Scope
Left Border Color and Text Direction
border-left-color always colors the physical left side. Text direction does not move the border — compare with border-inline-start-color when building RTL layouts.
LTR (direction: ltr)
Red left border on the left side
leftright
RTL (direction: rtl)
Left border color still on the left side
leftright
Compare
border-left-color vs related properties
Property
Targets
Best for
border-left-color
Color on the physical left side only
Left accent bars, quote dividers, recoloring one side
border-left
Width, style, and color on the left side
Setting the full left border in one rule
border-inline-start-color
Color on the inline-start side (direction-aware)
Leading edge accents that follow text direction in RTL
border-left-style
Style on the physical left side only
Changing solid, dashed, or dotted on the left edge
Preview
👀 Live Preview
A box with a blue left border on a gray frame:
Blue border on the physical left side.
Uses border: 3px solid #cbd5e1; and border-left-color: #2563eb;.
Hands-On
Examples Gallery
Try border-left-color with named colors, hex values, currentcolor, and RTL text.
📚 Basic Left Border Colors
Color only the physical left border side.
Example 1 — Red Left Border Color
Change the left border color to red on a box with a black frame, matching the reference tutorial.
border-left-color-red.html
<style>div{border:5px solid black;border-left-color:red;padding:10px;}</style><div>
This is a div with a red left border.
</div>
currentcolor is the default value. Here it makes the left border purple to match the text while other sides stay gray.
Example 4 — border-left-color in RTL
In RTL text, border-left-color stays on the physical left — unlike border-inline-start-color.
border-left-color-rtl.html
<style>.rtl-box{direction:rtl;border:3px solid #cbd5e1;border-left-color:#059669;padding:0.75rem 1rem;background:#ecfdf5;}</style><divclass="rtl-box">
حد فيزيكي على اليسار
</div>
RTL changes text flow but not the physical left edge. For a leading accent in RTL, use border-inline-start-color instead.
🧠 How border-left-color Works
1
Border must be visible
A width and style on the left side create a border to color.
Setup
2
Color longhand applies
border-left-color sets the physical left edge color only.
Color
3
Other sides stay unchanged
Top, right, and bottom borders keep their own colors unless you override them.
Scope
=
🎨
Colored left border
Only the physical left edge shows your chosen color.
Compatibility
Modern Browser Support
The border-left-color property is supported in all modern browsers, including Chrome, Firefox, Safari, Edge, and Opera.
✓ Baseline · Modern browsers
Physical left border colors in every browser
Chrome, Edge, Firefox, Safari, and Opera have supported border-left-color since the earliest CSS versions.
99%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-left-color property99% supported
Bottom line: Use border-left-color for reliable left-side accent colors in any modern browser.
Wrap Up
Conclusion
The border-left-color property controls the color of the physical left border. Use it for quote bars, left accents, and highlights where the border should stay on the left side.
Pair it with border-left-width and border-left-style, or use the border-left shorthand when you want width, style, and color together.
Set border width and style alongside color for visible left borders
Use currentcolor when the left border should match text
Use border-left-color for classic LTR left accent dividers
Override one side after a border shorthand to recolor only the left
Use border-inline-start-color when the accent must follow text direction in RTL
❌ Don’t
Set color alone without a visible border width and style
Expect border-left-color to move to the right in RTL layouts
Mix conflicting physical and logical color rules on the same element
Use border-left-color when the design needs a leading edge in RTL
Forget that the shorthand sets all sides before your longhand override
Summary
Key Takeaways
Knowledge Unlocked
Five things to remember about border-left-color
Use these points when coloring physical left borders.
5
Core concepts
🎨01
Left color only
Physical side.
Purpose
⚡02
currentcolor
Default.
Default
🔀03
red
Named color.
Values
🌐04
Fixed left
Not RTL-aware.
Physical
🛠05
Needs width
Color longhand.
Usage
❓ Frequently Asked Questions
The border-left-color property sets the color of the border on the physical left side of an element only.
The initial value is currentcolor, which uses the element's text color for the left border.
border-left-color always targets the physical left side, regardless of text direction or writing mode.
border-left-color only sets color. You also need a visible border width and style on the left side, or use a shorthand like border: 5px solid black plus this longhand.
border-left-color is fixed to the physical left side. border-inline-start-color follows writing direction, so it moves to the right in RTL layouts.