CSS border-inline-start-color Property

The border-inline-start-color property sets the color of an element's logical inline-start border without changing its width or style.

The physical border affected depends on the element's writing mode and text direction. In horizontal left-to-right writing, it controls the left border color. In horizontal right-to-left writing, it controls the right border color. In vertical writing modes, it can control the top or bottom border color.

border-inline-start-color Syntax

The property accepts a single CSS color value or a CSS-wide keyword.

selector {
  border-inline-start-color: #1769aa;
}

Hexadecimal Color

.panel {
  border-inline-start-color: #1769aa;
}

Named Color

.panel {
  border-inline-start-color: steelblue;
}

RGB Color

.panel {
  border-inline-start-color: rgb(23 105 170);
}

HSL Color

.panel {
  border-inline-start-color: hsl(207 76% 38%);
}

Current Text Color

.panel {
  border-inline-start-color: currentcolor;
}

Transparent Color

.panel {
  border-inline-start-color: transparent;
}

CSS Custom Property

.panel {
  border-inline-start-color: var(--accent-color);
}

CSS-Wide Keywords

.inherited {
  border-inline-start-color: inherit;
}
.reset {
  border-inline-start-color: initial;
}
.unset {
  border-inline-start-color: unset;
}
.reverted {
  border-inline-start-color: revert;
}
.layer-reverted {
  border-inline-start-color: revert-layer;
}

CSS-wide keywords must be used alone. They cannot be combined with another color value in the same declaration.

Property Values

The border-inline-start-color property accepts the same color values used by other CSS border-color properties.

Value Description
<color> A valid CSS color, including named colors, hexadecimal values, color functions, and system colors.
currentcolor Uses the element's computed color value.
transparent Uses a fully transparent color.
inherit Inherits the computed border color from the parent element.
initial Resets the property to currentcolor.
unset Resets the property to currentcolor because the property is not inherited.
revert Reverts the property according to cascade origin rules.
revert-layer Reverts the property according to cascade layer rules.

Property Characteristics

Characteristic Value
Initial value currentcolor
Inherited No
Applies to Elements that support the corresponding border-color properties
Computed value Computed color
Animation type By computed color
Percentages Not accepted as a standalone border color
Property type Longhand
Logical axis Inline axis

The property changes only the border color. It does not set the border width or style.

How It Works

The browser uses the element's writing mode and direction to determine which physical border receives the specified color.

Step 1: Create a Border

.panel {
  border-inline-start: 5px solid;
}

The border has a width and style, so it can be displayed.

Step 2: Set the Color

.panel {
  border-inline-start: 5px solid;
  border-inline-start-color: #1769aa;
}

The logical inline-start border becomes blue.

Step 3: Use Left-to-Right Direction

.panel {
  direction: ltr;
  border-inline-start: 5px solid;
  border-inline-start-color: #1769aa;
}

In horizontal writing mode, the blue border appears on the left.

Step 4: Use Right-to-Left Direction

.panel {
  direction: rtl;
  border-inline-start: 5px solid;
  border-inline-start-color: #1769aa;
}

The blue border appears on the right.

Step 5: Use Vertical Writing

.panel {
  writing-mode: vertical-rl;
  direction: ltr;
  border-inline-start: 5px solid;
  border-inline-start-color: #1769aa;
}

The blue border appears on the top.

Only the physical location changes. The specified color remains the same.

Writing Modes

The logical inline-start edge depends on the element's writing-mode and direction properties.

Writing Mode Direction Physical Border
horizontal-tb ltr Left
horizontal-tb rtl Right
vertical-rl ltr Top
vertical-rl rtl Bottom
vertical-lr ltr Top
vertical-lr rtl Bottom
sideways-rl ltr Top
sideways-lr ltr Bottom

Horizontal Writing Mode

.panel {
  writing-mode: horizontal-tb;
  direction: ltr;
  border-inline-start: 5px solid;
  border-inline-start-color: #1769aa;
}

The border color applies to the left edge.

Vertical Right-to-Left Writing Mode

.panel {
  writing-mode: vertical-rl;
  direction: ltr;
  border-inline-start: 5px solid;
  border-inline-start-color: #1769aa;
}

The border color applies to the top edge.

Vertical Left-to-Right Writing Mode

.panel {
  writing-mode: vertical-lr;
  direction: rtl;
  border-inline-start: 5px solid;
  border-inline-start-color: #1769aa;
}

The border color applies to the bottom edge.

Using logical border properties avoids manually switching between physical border colors when the writing mode changes.

Text Direction

The direction property controls the progression of inline content and affects which physical edge is considered inline-start.

Left-to-Right Content

.ltr-panel {
  direction: ltr;
  border-inline-start: 5px solid;
  border-inline-start-color: #1769aa;
}

The border is blue on the left in horizontal writing mode.

Right-to-Left Content

.rtl-panel {
  direction: rtl;
  border-inline-start: 5px solid;
  border-inline-start-color: #1769aa;
}

The border is blue on the right in horizontal writing mode.

Using the HTML dir Attribute

<div dir="ltr" class="directional-panel">
  Left-to-right content
</div>
<div dir="rtl" class="directional-panel">
  Right-to-left content
</div>
.directional-panel {
  padding: 20px;
  border-inline-start: 5px solid;
  border-inline-start-color: #1769aa;
}

The same CSS applies the border color to the appropriate starting edge of each element.

Matching Logical Padding

.directional-panel {
  padding-inline-start: 20px;
  border-inline-start: 5px solid;
  border-inline-start-color: #1769aa;
}

The padding and border remain aligned with the logical beginning of the content.

Use the HTML dir attribute to identify text direction when creating multilingual content.

CSS Color Formats

The border-inline-start-color property supports standard CSS color formats.

Named Colors

.panel {
  border-inline-start-color: steelblue;
}

Named colors provide a readable way to specify common colors.

Hexadecimal Colors

.panel {
  border-inline-start-color: #1769aa;
}

Hexadecimal notation represents color channels using hexadecimal digits.

Short Hexadecimal Colors

.panel {
  border-inline-start-color: #369;
}

Three-digit hexadecimal notation expands each digit into a corresponding two-digit channel value.

RGB Colors

.panel {
  border-inline-start-color: rgb(23 105 170);
}

The RGB function defines a color using red, green, and blue channels.

RGB With Alpha

.panel {
  border-inline-start-color: rgb(23 105 170 / 60%);
}

The alpha component makes the color partially transparent.

HSL Colors

.panel {
  border-inline-start-color: hsl(207 76% 38%);
}

The HSL function defines a color using hue, saturation, and lightness.

HSL With Alpha

.panel {
  border-inline-start-color: hsl(207 76% 38% / 60%);
}

The alpha component controls transparency.

HWB Colors

.panel {
  border-inline-start-color: hwb(207 9% 33%);
}

The HWB function defines a color using hue, whiteness, and blackness.

LAB Colors

.panel {
  border-inline-start-color: lab(45% 0 -30);
}

The LAB function specifies a color using perceptual lightness and two color-opponent axes.

OKLCH Colors

.panel {
  border-inline-start-color: oklch(55% 0.15 250);
}

The OKLCH function uses lightness, chroma, and hue.

color() Function

.panel {
  border-inline-start-color: color(display-p3 0.1 0.4 0.7);
}

The color() function can specify colors in supported color spaces.

color-mix() Function

.panel {
  border-inline-start-color: color-mix(in srgb, #1769aa 70%, white);
}

The color-mix() function calculates a color by mixing two colors.

Choose color formats based on readability, browser requirements, and the color features needed by the design.

Using currentcolor

The currentcolor keyword uses the element's computed color value as the border color.

Basic Example

.panel {
  color: #1769aa;
  border-inline-start: 5px solid;
  border-inline-start-color: currentcolor;
}

The border uses the same blue color as the text.

Initial Border Color

.panel {
  color: #1769aa;
  border-inline-start: 5px solid;
}

The omitted border color defaults to currentcolor, so the border uses the text color.

Changing Text Color

.panel {
  color: #1769aa;
  border-inline-start: 5px solid;
  border-inline-start-color: currentcolor;
}
.panel.warning {
  color: #d35400;
}

The warning panel's border becomes orange because it follows the element's text color.

Inherited Text Color

.container {
  color: #1769aa;
}
.container .panel {
  border-inline-start: 5px solid;
  border-inline-start-color: currentcolor;
}

The panel can use the text color inherited from its parent.

Explicit Border Color

.panel {
  color: #333333;
  border-inline-start: 5px solid;
  border-inline-start-color: #1769aa;
}

The text remains dark gray while the border is blue.

Use currentcolor when the border should follow the element's text color. Use an explicit color when the border and text need different colors.

Transparent Borders

The transparent keyword makes the border color fully transparent without removing its width or style.

Transparent Border

.panel {
  border-inline-start: 5px solid;
  border-inline-start-color: transparent;
}

The border is not visibly colored, but its width remains part of the element's border box.

Reveal on Hover

.panel {
  border-inline-start: 5px solid;
  border-inline-start-color: transparent;
}
.panel:hover {
  border-inline-start-color: #1769aa;
}

The border becomes visible on hover without changing its thickness.

Partially Transparent Color

.panel {
  border-inline-start: 5px solid;
  border-inline-start-color: rgb(23 105 170 / 40%);
}

The border appears partially transparent.

Opacity Comparison

.panel {
  border-inline-start: 5px solid;
  border-inline-start-color: rgb(23 105 170 / 50%);
}

Using an alpha component affects only the specified border color. Applying opacity to the element would also affect its content and descendants.

Transparent vs. none

.transparent-border {
  border-inline-start: 5px solid transparent;
}
.no-border {
  border-inline-start: none;
}

The transparent border retains its width. The border with style none has a computed width of zero.

Transparent borders are useful when reserving space for interactive state changes.

Border Visibility

Setting border-inline-start-color does not automatically create a visible border. A visible border also requires a suitable style and nonzero width.

Color Without Style

.panel {
  border-inline-start-color: #1769aa;
}

The border is not visible if its style remains at the initial value of none.

Add a Border Style

.panel {
  border-inline-start-style: solid;
  border-inline-start-color: #1769aa;
}

The border becomes visible using the initial medium width.

Add a Border Width

.panel {
  border-inline-start-width: 5px;
  border-inline-start-style: solid;
  border-inline-start-color: #1769aa;
}

The border is 5 pixels wide, solid, and blue.

Style none

.panel {
  border-inline-start: 5px none;
  border-inline-start-color: #1769aa;
}

The border is not visible because the style is none.

Zero Width

.panel {
  border-inline-start: 0 solid;
  border-inline-start-color: #1769aa;
}

The border is not visible because its width is zero.

Hidden Border

.panel {
  border-inline-start: 5px hidden;
  border-inline-start-color: #1769aa;
}

The border is not drawn because its style is hidden.

Complete Border

.panel {
  border-inline-start: 5px solid #1769aa;
}

The shorthand sets all three components in one declaration.

If a border color appears to have no effect, check the border style and width before changing the color value.

Shorthand Properties

The border-inline-start-color property is a longhand component of the border-inline-start shorthand.

border-inline-start Shorthand

.panel {
  border-inline-start: 5px solid #1769aa;
}

This sets the width, style, and color of the inline-start border.

Equivalent Longhands

.panel {
  border-inline-start-width: 5px;
  border-inline-start-style: solid;
  border-inline-start-color: #1769aa;
}

The three longhand declarations produce the same result.

Changing Only the Color

.panel {
  border-inline-start: 5px solid #1769aa;
  border-inline-start-color: #27ae60;
}

The border becomes green while retaining its width and style.

border-inline Shorthand

.panel {
  border-inline: 5px solid #cccccc;
  border-inline-start-color: #1769aa;
}

Both inline borders initially receive a gray color. The inline-start border is then changed to blue.

border-inline-color Shorthand

.panel {
  border-inline: 5px solid;
  border-inline-color: #1769aa #27ae60;
}

The first color applies to inline-start, and the second applies to inline-end.

Overriding One Color

.panel {
  border-inline: 5px solid;
  border-inline-color: #1769aa #27ae60;
  border-inline-start-color: #d35400;
}

The inline-start border becomes orange. The inline-end border remains green.

border Shorthand

.panel {
  border: 1px solid #cccccc;
  border-inline-start-color: #1769aa;
}

All borders initially receive a gray color. The logical inline-start border becomes blue.

Shorthand Reset

.panel {
  border-inline-start-color: #27ae60;
  border-inline-start: 5px solid #1769aa;
}

The later shorthand sets the color to blue, overriding the earlier green value.

Use the color longhand when changing only the border color to avoid resetting the width or style.

Physical vs. Logical Border Colors

Physical border-color properties always target a fixed physical edge. Logical border-color properties follow the writing mode and direction.

Property Target
border-left-color Physical left border
border-right-color Physical right border
border-top-color Physical top border
border-bottom-color Physical bottom border
border-inline-start-color Logical inline-start border

Physical Left Border Color

.panel {
  border-left: 5px solid;
  border-left-color: #1769aa;
}

The left border remains blue regardless of the element's text direction.

Logical Inline-Start Border Color

.panel {
  border-inline-start: 5px solid;
  border-inline-start-color: #1769aa;
}

The border color follows the logical starting edge.

Horizontal LTR

.panel {
  direction: ltr;
  border-inline-start: 5px solid;
  border-inline-start-color: #1769aa;
}

The left border is blue.

Horizontal RTL

.panel {
  direction: rtl;
  border-inline-start: 5px solid;
  border-inline-start-color: #1769aa;
}

The right border is blue.

Vertical Writing

.panel {
  writing-mode: vertical-rl;
  direction: ltr;
  border-inline-start: 5px solid;
  border-inline-start-color: #1769aa;
}

The top border is blue.

Mixing Physical and Logical Colors

.panel {
  border: 5px solid #cccccc;
  border-left-color: #27ae60;
  border-inline-start-color: #1769aa;
}

In horizontal left-to-right writing, both color declarations target the left border. When their cascade priority is otherwise equal, the later logical declaration wins.

In horizontal right-to-left writing, the physical left border remains green while the logical inline-start border on the right becomes blue.

Prefer logical border-color properties for layouts that need to adapt to different text directions.

Inline-Start vs. Inline-End

The border-inline-start-color and border-inline-end-color properties control the colors of opposite logical borders.

Inline-Start Color

.panel {
  border-inline-start: 5px solid;
  border-inline-start-color: #1769aa;
}

The logical starting border is blue.

Inline-End Color

.panel {
  border-inline-end: 5px solid;
  border-inline-end-color: #27ae60;
}

The logical ending border is green.

Different Colors on Both Edges

.panel {
  border-inline: 5px solid;
  border-inline-start-color: #1769aa;
  border-inline-end-color: #27ae60;
}

The inline-start border is blue, and the inline-end border is green.

Using border-inline-color

.panel {
  border-inline: 5px solid;
  border-inline-color: #1769aa #27ae60;
}

The two-value shorthand assigns blue to inline-start and green to inline-end.

Same Color on Both Edges

.panel {
  border-inline: 5px solid;
  border-inline-color: #1769aa;
}

A single color value applies to both inline borders.

Horizontal Direction Mapping

Direction Inline-Start Inline-End
LTR Left Right
RTL Right Left

Use the individual longhands when the two logical edges need independently controlled colors.

Cascade and Overrides

The CSS cascade determines which border color applies when multiple declarations affect the same physical edge.

Later Declaration

.panel {
  border-inline-start-color: #1769aa;
  border-inline-start-color: #27ae60;
}

The later green value wins when both declarations have the same cascade priority.

Higher Specificity

.panel {
  border-inline-start-color: #1769aa;
}
.panel.warning {
  border-inline-start-color: #d35400;
}

The warning panel uses orange because the more specific selector overrides the base rule.

Shorthand Override

.panel {
  border-inline-start-color: #27ae60;
  border-inline-start: 5px solid #1769aa;
}

The later shorthand sets the color to blue.

Longhand Override

.panel {
  border-inline-start: 5px solid #1769aa;
  border-inline-start-color: #27ae60;
}

The later longhand changes only the color to green.

Physical Color Conflict

.panel {
  border-left-color: #27ae60;
  border-inline-start-color: #1769aa;
}

In horizontal left-to-right writing, both declarations map to the left border color. The later declaration wins when their cascade priority is otherwise equal.

CSS Layers

@layer base, components;
@layer base {
  .panel {
    border-inline-start-color: #cccccc;
  }
}
@layer components {
  .panel {
    border-inline-start-color: #1769aa;
  }
}

For normal declarations, the later layer has higher priority, so the component color wins.

When debugging border colors, check selector specificity, declaration order, shorthand resets, cascade layers, and logical-to-physical mapping.

CSS Custom Properties

CSS custom properties allow border colors to be reused and changed without repeating color values throughout a stylesheet.

Global Accent Color

:root {
  --accent-color: #1769aa;
}
.panel {
  border-inline-start: 5px solid;
  border-inline-start-color: var(--accent-color);
}

The border uses the shared accent color.

Component-Level Override

.panel {
  --accent-color: #1769aa;
  border-inline-start: 5px solid;
  border-inline-start-color: var(--accent-color);
}
.panel.success {
  --accent-color: #27ae60;
}

The success panel uses green without changing the border declaration.

Fallback Color

.panel {
  border-inline-start: 5px solid;
  border-inline-start-color: var(--accent-color, #1769aa);
}

The fallback blue color is used when the custom property is unavailable or has the guaranteed-invalid value.

Theme-Based Colors

:root {
  --accent-color: #1769aa;
}
[data-theme="dark"] {
  --accent-color: #79b8f3;
}
.panel {
  border-inline-start: 5px solid;
  border-inline-start-color: var(--accent-color);
}

The border color adapts to the selected theme.

State Colors

:root {
  --info-color: #1769aa;
  --success-color: #27ae60;
  --warning-color: #d35400;
}
.notice {
  border-inline-start: 5px solid;
  border-inline-start-color: var(--info-color);
}
.notice.success {
  border-inline-start-color: var(--success-color);
}
.notice.warning {
  border-inline-start-color: var(--warning-color);
}

Custom properties provide a consistent color system for reusable interface components.

Hover and Focus States

The border-inline-start-color property can change in response to user interaction.

Hover State

.panel {
  border-inline-start: 5px solid;
  border-inline-start-color: #cccccc;
}
.panel:hover {
  border-inline-start-color: #1769aa;
}

The border changes from gray to blue on hover.

Focus State

.form-field {
  border-inline-start: 5px solid;
  border-inline-start-color: #cccccc;
}
.form-field:focus {
  border-inline-start-color: #1769aa;
}

The border changes color when the field receives focus.

Keyboard Focus

.form-field {
  border-inline-start: 5px solid;
  border-inline-start-color: #cccccc;
}
.form-field:focus-visible {
  border-inline-start-color: #1769aa;
  outline: 2px solid #1769aa;
  outline-offset: 2px;
}

The border and outline provide a visible keyboard focus indicator.

Active Navigation Item

.nav-link {
  border-inline-start: 4px solid;
  border-inline-start-color: transparent;
}
.nav-link[aria-current="page"] {
  border-inline-start-color: #1769aa;
}

The current navigation item displays a colored starting-edge border.

Selected Component

.selectable-panel {
  border-inline-start: 5px solid;
  border-inline-start-color: #cccccc;
}
.selectable-panel.is-selected {
  border-inline-start-color: #27ae60;
}

The selected panel uses a green border.

Do not rely on border color alone to communicate important states. Use text, icons, or other visual indicators when needed.

Transitions and Animation

Border colors can transition smoothly between compatible color values.

Basic Color Transition

.panel {
  border-inline-start: 5px solid;
  border-inline-start-color: #cccccc;
  transition: border-inline-start-color 0.3s ease;
}
.panel:hover {
  border-inline-start-color: #1769aa;
}

The border color transitions from gray to blue.

Transition With Custom Properties

.panel {
  --border-color: #cccccc;
  border-inline-start: 5px solid;
  border-inline-start-color: var(--border-color);
  transition: border-inline-start-color 0.3s ease;
}
.panel:hover {
  --border-color: #1769aa;
}

The resolved border color changes when the custom property changes.

Keyframe Animation

@keyframes border-color-change {
  from {
    border-inline-start-color: #1769aa;
  }
  to {
    border-inline-start-color: #27ae60;
  }
}
.animated-panel {
  border-inline-start: 5px solid;
  animation: border-color-change 2s ease-in-out infinite alternate;
}

The border color animates between blue and green.

Reduced Motion Preference

.panel {
  border-inline-start: 5px solid #cccccc;
  transition: border-inline-start-color 0.3s ease;
}
.panel:hover {
  border-inline-start-color: #1769aa;
}
@media (prefers-reduced-motion: reduce) {
  .panel {
    transition: none;
  }
}

The transition is disabled when the user requests reduced motion.

Color-Only Changes

.panel {
  border-inline-start: 5px solid transparent;
  transition: border-inline-start-color 0.3s ease;
}
.panel:hover {
  border-inline-start-color: #1769aa;
}

Changing only the color avoids the layout changes that can occur when border width changes.

Responsive Design

The border-inline-start-color property can respond to viewport size, container size, color schemes, and writing direction.

Media Query

.responsive-panel {
  border-inline-start: 5px solid;
  border-inline-start-color: #1769aa;
}
@media (max-width: 600px) {
  .responsive-panel {
    border-inline-start-color: #27ae60;
  }
}

The border changes from blue to green on smaller screens.

Container Query

.panel-container {
  container-type: inline-size;
}
.responsive-panel {
  border-inline-start: 5px solid;
  border-inline-start-color: #1769aa;
}
@container (min-width: 500px) {
  .responsive-panel {
    border-inline-start-color: #27ae60;
  }
}

The border changes color when its query container reaches the specified inline size.

Dark Color Scheme

.responsive-panel {
  border-inline-start: 5px solid;
  border-inline-start-color: #1769aa;
}
@media (prefers-color-scheme: dark) {
  .responsive-panel {
    border-inline-start-color: #79b8f3;
  }
}

The border uses a lighter blue when the user prefers a dark color scheme.

Responsive Writing Mode

.responsive-panel {
  writing-mode: horizontal-tb;
  border-inline-start: 5px solid;
  border-inline-start-color: #1769aa;
}
@media (min-width: 900px) {
  .responsive-panel {
    writing-mode: vertical-rl;
  }
}

With left-to-right inline progression, the border moves from the left edge to the top edge while retaining its color.

Custom Property Theme

.responsive-panel {
  --accent-color: #1769aa;
  border-inline-start: 5px solid;
  border-inline-start-color: var(--accent-color);
}
@media (max-width: 600px) {
  .responsive-panel {
    --accent-color: #27ae60;
  }
}

The border color changes through a custom property.

Logical border colors are particularly useful for responsive interfaces that also support different writing directions.

Practical Uses

The border-inline-start-color property is useful for changing border accents without modifying border thickness or style.

Information Notice

.notice {
  padding: 20px;
  border-inline-start: 5px solid;
  border-inline-start-color: #1769aa;
  background-color: #f3f8fc;
}

The blue border identifies informational content.

Success Notice

.notice.success {
  border-inline-start-color: #27ae60;
  background-color: #f0faf3;
}

The green border distinguishes success content.

Warning Notice

.notice.warning {
  border-inline-start-color: #d35400;
  background-color: #fff6eb;
}

The orange border identifies warning content.

Blockquote Accent

blockquote {
  padding-inline-start: 20px;
  border-inline-start: 4px solid;
  border-inline-start-color: #1769aa;
}

The border color emphasizes quoted content.

Active Navigation

.nav-link {
  border-inline-start: 4px solid;
  border-inline-start-color: transparent;
}
.nav-link[aria-current="page"] {
  border-inline-start-color: #1769aa;
}

The active navigation item receives a colored starting-edge indicator.

Form Validation

.form-field {
  border-inline-start: 4px solid;
  border-inline-start-color: #cccccc;
}
.form-field:invalid {
  border-inline-start-color: #c0392b;
}
.form-field:valid {
  border-inline-start-color: #27ae60;
}

The border color changes according to the field's validation state. Provide text feedback as well so the meaning does not depend on color alone.

Selected Card

.card {
  border-inline-start: 5px solid;
  border-inline-start-color: #dddddd;
}
.card.is-selected {
  border-inline-start-color: #1769aa;
}

The selected card receives a blue border.

Theme-Based Accent

:root {
  --accent-color: #1769aa;
}
[data-theme="green"] {
  --accent-color: #27ae60;
}
.card {
  border-inline-start: 5px solid;
  border-inline-start-color: var(--accent-color);
}

The border color follows the selected theme.

Use the color longhand when a component already has the desired border width and style.

border-inline-start-color Example

The following example demonstrates how the same logical border color appears on different physical edges depending on writing mode and direction.

<div class="border-inline-start-color-demo">
  <div class="demo-item">
    <h3>Horizontal LTR</h3>
    <div class="demo-box horizontal-ltr">Blue left border</div>
  </div>
  <div class="demo-item">
    <h3>Horizontal RTL</h3>
    <div class="demo-box horizontal-rtl">Blue right border</div>
  </div>
  <div class="demo-item">
    <h3>Vertical LTR</h3>
    <div class="demo-box vertical-ltr">Blue top border</div>
  </div>
  <div class="demo-item">
    <h3>Vertical RTL</h3>
    <div class="demo-box vertical-rtl">Blue bottom border</div>
  </div>
</div>
.border-inline-start-color-demo {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px;
}
.border-inline-start-color-demo .demo-item {
  min-width: 0;
}
.border-inline-start-color-demo h3 {
  margin-bottom: 12px;
  font-size: 1rem;
}
.border-inline-start-color-demo .demo-box {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 150px;
  padding: 20px;
  border-inline-start-width: 6px;
  border-inline-start-style: solid;
  border-inline-start-color: #1769aa;
  background-color: #f3f8fc;
  color: #173b5e;
  font-weight: bold;
  text-align: center;
}
.border-inline-start-color-demo .horizontal-ltr {
  writing-mode: horizontal-tb;
  direction: ltr;
}
.border-inline-start-color-demo .horizontal-rtl {
  writing-mode: horizontal-tb;
  direction: rtl;
}
.border-inline-start-color-demo .vertical-ltr {
  writing-mode: vertical-rl;
  direction: ltr;
}
.border-inline-start-color-demo .vertical-rtl {
  writing-mode: vertical-rl;
  direction: rtl;
}

All four elements use the same border color. Only their writing modes and directions differ.

Browser Result

Horizontal LTR

Blue left border

Horizontal RTL

Blue right border

Vertical LTR

Blue top border

Vertical RTL

Blue bottom border

The horizontal left-to-right example displays a blue border on the left.

The horizontal right-to-left example displays a blue border on the right.

The vertical left-to-right example displays a blue border on the top.

The vertical right-to-left example displays a blue border on the bottom.

The color remains unchanged while the logical border maps to different physical edges.

Important Considerations

Keep the following points in mind when using border-inline-start-color:

  • Purpose: Sets the color of the logical inline-start border.
  • Property type: Longhand.
  • Initial value: currentcolor.
  • Inheritance: The property is not inherited.
  • Logical edge: Follows the beginning of the inline axis.
  • Writing mode: Determines whether the inline axis is horizontal or vertical.
  • Direction: Determines the inline progression direction.
  • Horizontal LTR: Controls the left border color.
  • Horizontal RTL: Controls the right border color.
  • Vertical top-to-bottom: Controls the top border color.
  • Vertical bottom-to-top: Controls the bottom border color.
  • Color values: Accepts standard CSS color formats.
  • currentcolor: Uses the element's computed text color.
  • Transparent: Makes the border color invisible without removing its width.
  • Alpha transparency: Allows partially transparent border colors.
  • Visible border: Requires a suitable border style and nonzero width.
  • Style none: Prevents the border from being drawn.
  • Style hidden: Prevents the border from being drawn.
  • Zero width: Produces no visible border thickness.
  • Width and style: Are not changed by this property.
  • Shorthand: border-inline-start sets width, style, and color together.
  • Inline color shorthand: border-inline-color can set both inline border colors.
  • Inline-end: border-inline-end-color controls the opposite logical edge.
  • Physical borders: Can conflict with logical borders when both map to the same edge.
  • Shorthand resets: Later shorthand declarations may override the specified color.
  • Animation: Border colors can interpolate between compatible color values.
  • Custom properties: Can provide reusable and theme-dependent colors.
  • Responsive design: Can use media queries and container queries.
  • Accessibility: Do not rely on border color alone to communicate important information.
  • Browser support: Modern browsers support the standard property without vendor prefixes.

Use border-inline-start-color when the width and style are already defined and only the color of the logical starting border needs to change.

Browser Support

The border-inline-start-color property is widely available in current versions of Chrome, Edge, Firefox, Safari, and other major browsers.

The standard property does not require vendor prefixes in modern browsers.

Basic Declaration

.panel {
  border-inline-start: 5px solid;
  border-inline-start-color: #1769aa;
}

Right-to-Left Direction

.panel {
  direction: rtl;
  border-inline-start: 5px solid;
  border-inline-start-color: #1769aa;
}

Vertical Writing Mode

.panel {
  writing-mode: vertical-rl;
  border-inline-start: 5px solid;
  border-inline-start-color: #1769aa;
}

Physical Border Fallback

.panel {
  border-left: 5px solid #1769aa;
}
@supports (border-inline-start-color: #1769aa) {
  .panel {
    border-left: 0;
    border-inline-start: 5px solid;
    border-inline-start-color: #1769aa;
  }
}

This fallback assumes horizontal left-to-right writing. Older browsers use a physical left border, while supporting browsers use the logical inline-start border.

Visit Can I Use? and search for border-inline-start-color to review browser compatibility.

Specifications

The border-inline-start-color property is defined in the CSS Logical Properties and Values Module Level 1 specification.

CSS Logical Properties and Values Module Level 1

The specification defines the logical border-color property and its mapping to the corresponding physical border.

Border-color behavior is also defined by the CSS Backgrounds and Borders specification.

CSS Backgrounds and Borders Module Level 3