CSS border-block-start-color Property

Beginner
⏱️ 5 min read
📚 Updated: Jun 2026
🎯 4 Examples
Logical CSS & Color

What You’ll Learn

The border-block-start-color property sets the color of the block-start border on an element. In horizontal writing, that usually means the top border color.

01

Block-Start Color

One logical edge only.

02

Color Formats

Named, hex, rgb, hsl.

03

currentColor

Matches text color.

04

Longhand

Part of border-block-start.

05

Writing Modes

Adapts to text flow.

06

Needs Style

Pair with width/style.

Definition and Usage

The border-block-start-color CSS property allows you to specify the color of the border on the block-start side of an element. The block-start side corresponds to the top edge in a left-to-right, top-to-bottom writing mode, but it can vary depending on the writing mode of the document.

This property is useful for creating layouts that respect the document’s writing direction and is part of CSS logical properties for modern, multilingual web design.

💡
Beginner Tip

border-block-start-color only changes color. Add border-block-start-style: solid; and border-block-start-width: 2px; so the border is visible, or use the border-block-start shorthand instead.

📝 Syntax

The syntax for border-block-start-color is simple. It can be applied to any element that has borders, and the color can be specified using any valid CSS color value.

syntax.css
selector {
  border-block-start-color: <color>;
}

Basic Example

border-block-start-color.css
.box {
  border-block-start-style: solid;
  border-block-start-width: 2px;
  border-block-start-color: green;
}

The color value can be a named color, hexadecimal value, RGB, HSL, or any other valid CSS color.

Syntax Rules

  • This property affects only the block-start border color.
  • It does not set width or style by itself.
  • Use with border-block-start-width and border-block-start-style for full control.
  • Alternatively, use border-block-start: 2px solid green; as shorthand.
  • The color follows writing mode and stays on the logical block-start edge.

⚡ Quick Reference

QuestionAnswer
Initial valuecurrentColor
Applies toBlock-start border color only
InheritedNo
AnimatableYes, as a color
Common useCard accents, section headers, themed block-start rules

Default Value

The default value of border-block-start-color is currentColor. That means the block-start border uses the element’s text color value unless you override it.

💎 Property Values

border-block-start-color accepts any valid CSS color value.

ValueDescription
named-colorA color keyword, such as red, blue, or green
hexadecimal valueA hex code representing a color, such as #ff5733
RGB valueAn RGB color value, such as rgb(255, 87, 51)
HSL valueAn HSL color value, such as hsl(9, 100%, 60%)
transparentMakes the border color fully transparent
currentColorUses the current value of the color property
green #2563eb rgb() hsl()

Works With Other Longhands

width + color
style + color
custom color

Block-Start Color and Writing Modes

The block-start edge follows the block axis, so the same color rule adapts when writing mode changes.

Horizontal writing

Blue block-start (top) border color

Vertical writing (vertical-rl)

Logical block-start color

border-block-start-color vs border-top-color

PropertyTargetsBest for
border-block-start-colorLogical block-start border colorMultilingual and writing-mode-aware layouts
border-top-colorPhysical top border colorSimple horizontal pages with fixed top accents
border-block-startWidth, style, and color togetherWhen you want one shorthand for the full block-start border

👀 Live Preview

A box with a green block-start border color:

This element has a green block-start border color.

Uses border-block-start-style: solid;, border-block-start-width: 4px;, and border-block-start-color: #16a34a;.

Examples Gallery

Try border-block-start-color with green borders, hex values, currentColor, and vertical writing mode.

📚 Basic Block-Start Color

Set the block-start border color with longhand properties for width, style, and color.

Example 1 — Green Block-Start Border Color

Change the color of the border on the block-start side to green.

border-block-start-color-green.html
<style>
  .box {
    border-block-start-style: solid;
    border-block-start-width: 2px;
    border-block-start-color: green;
    padding-block-start: 0.75rem;
  }
</style>

<div class="box">
  This box has a green block-start border. In English, this is the top edge.
</div>
Try It Yourself

How It Works

Color alone is not enough. The visible green line appears because style and width are also set on the block-start edge.

Example 2 — Hex Color Block-Start Border

Use a hexadecimal color for a branded block-start accent line.

border-block-start-color-hex.css
.header-rule {
  border-block-start: 3px solid #2563eb;
  border-block-start-color: #2563eb;
  padding-block-start: 1rem;
}
Try It Yourself

How It Works

You can set color through the shorthand first, then override only the color longhand when needed for theme variations.

🎨 Advanced Color Usage

Use currentColor and writing modes when building flexible, theme-aware logical borders.

Example 3 — currentColor Block-Start Border

Let the block-start border inherit the element’s text color automatically.

border-block-start-color-current.css
.quote {
  color: #059669;
  border-block-start-style: solid;
  border-block-start-width: 2px;
  border-block-start-color: currentColor;
}
Try It Yourself

How It Works

currentColor keeps the border aligned with the text. Change the text color and the block-start border updates automatically.

Example 4 — Block-Start Color in Vertical Writing Mode

See how block-start border color follows the writing mode instead of staying on the physical top.

border-block-start-color-vertical.css
.vertical-panel {
  writing-mode: vertical-rl;
  border-block-start-style: solid;
  border-block-start-width: 3px;
  border-block-start-color: #7c3aed;
  padding: 1rem;
}
Try It Yourself

How It Works

With writing-mode: vertical-rl, block-start no longer means physical top, but the purple color still applies to the correct logical edge.

🧠 How border-block-start-color Works

1

You make the border visible

Set border-block-start-style and border-block-start-width first.

Border setup
2

You choose a color

Apply any CSS color with border-block-start-color.

Color rule
3

The browser maps it to block-start

Only the logical block-start edge receives that color based on writing mode.

Logical mapping
=

Colored block-start border

Your element gets a precise color accent on the logical start edge.

Universal Browser Support

border-block-start-color is supported in all modern browsers as part of the CSS Logical Properties module. Internet Explorer does not support it.

Baseline · Modern browsers

Logical border colors in today’s browsers

Chrome, Firefox, Safari, Edge, and Opera support border-block-start-color in current versions.

96% Modern browser support
Google Chrome69+ · Desktop & Mobile
Full support
Mozilla Firefox66+ · Desktop & Mobile
Full support
Apple Safari12.1+ · macOS & iOS
Full support
Microsoft Edge79+ · Chromium
Full support
Opera56+ · Modern versions
Full support

Fallback behavior

For older browsers, use border-top-color as a physical fallback in horizontal layouts.

💻
Internet Explorer No support · Use border-top-color instead
None
border-block-start-color property 96% supported

Bottom line: Test your design across browsers when using logical border colors in multilingual layouts.

Conclusion

The border-block-start-color property is a useful tool for customizing the appearance of borders in relation to the writing mode of your document. By setting the color of the border on the block-start side, you can create visually appealing and contextually appropriate designs.

Experiment with this property to enhance the visual style of your web layouts across different languages and writing directions.

💡 Best Practices

✅ Do

  • Pair color with border-block-start-style and border-block-start-width
  • Use currentColor for theme-friendly borders that match text
  • Use hex or hsl values for brand-consistent accent lines
  • Test block-start colors in vertical writing mode when needed
  • Use the border-block-start shorthand for simpler rules

❌ Don’t

  • Set color alone and expect a visible border without style and width
  • Assume block-start always equals physical top
  • Use border-top-color and logical color properties together without reason
  • Forget contrast between border color and background
  • Skip browser testing for writing-mode-aware layouts

Key Takeaways

Knowledge Unlocked

Five things to remember about border-block-start-color

Use these points when coloring the logical block-start edge.

5
Core concepts
⚙️02

currentColor

Default color source.

Default
📝03

Any CSS Color

Named, hex, rgb, hsl.

Values
🛠️04

Needs Style

Pair with longhands.

Setup
🔄05

Writing Mode

Adapts to flow.

Context

❓ Frequently Asked Questions

The border-block-start-color property sets the color of the border on the block-start side of an element. In horizontal writing, that is usually the top border color.
The initial value is currentColor, which uses the element's text color for the block-start border.
This property only sets color. You also need border-block-start-style such as solid and border-block-start-width greater than zero, or use the border-block-start shorthand.
border-top-color always colors the physical top edge. border-block-start-color follows the writing mode and stays on the logical block-start side.
Use it when you want to color only the block-start border separately from other edges, especially in logical layouts that may change writing mode.

Practice in the Live Editor

Open the HTML editor, try border-block-start-color, and preview logical block-start borders instantly.

HTML Editor →

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.

5 people found this page helpful