Home CSS Properties border-block-start-color CSS border-block-start-color Property Definition
Definition and Usage The border-block-start-color property sets the color of the logical block-start border. It does not set width or style. In the default horizontal writing mode, block-start is usually the top edge, so it acts like border-top-color .
The physical edge depends on writing-mode , direction , and text-orientation . It applies to all elements and is not inherited. The initial value is currentcolor.
Standard-track. Not deprecated and not experimental. Logical border color longhands have been widely available since 2020.
Syntax
CSS Syntax border-block-start-color: <color> | initial | inherit ;
Any valid CSS color works. You still need a visible border-block-start-style and width for the color to show.
Values
Property Values Value Description Try it blueA named color on the block-start edge Try it#2563ebA hex color Try itrgb(220 38 38)An rgb() color Try itcurrentcolorUses the element’s text color. Initial value Try ittransparentInvisible color; width still takes space Try itinitialResets to currentcolor Try itinheritInherits this property from the parent element Try it
Approach
How to Use border-block-start-color Give the block-start edge a style and width first, then set its color.
Set a visible style, for example border-block-start-style: solid; Set a positive width, for example border-block-start-width: 4px; Add border-block-start-color with any valid color. Or use the border-block-start shorthand to set all three together. Piece Required? Role Border style Yes (to show a line) solid, dashed, and so onBorder width Yes (to see color) Zero width hides the color Border color Yes (this property) Any <color>; defaults to currentcolor
Try it
Live Preview Style and width stay fixed at 4px solid. Only border-block-start-color changes.
Code
CSS Examples Each snippet focuses on border-block-start-color. Style and width are only there so the color can show. Use Try It Yourself for a live editor.
1. Named color 2. currentcolor 3. Vertical writing Example 1 — Named Color Color only the block-start edge with a named value.
<style>
p {
border-block-start-style: solid;
border-block-start-width: 4px;
border-block-start-color: blue;
}
</style>
<p>Block start</p> How It Works Draw the line. border-block-start-style: solid makes a visible stroke.Give it thickness. border-block-start-width: 4px sets how thick that stroke is.Paint the color. border-block-start-color: blue colors only the block-start edge.Find the edge. With default horizontal writing, that is usually the top of the paragraph.Example 2 — currentcolor Let the border follow the text color.
<style>
p {
color: #7c3aed;
border-block-start-style: solid;
border-block-start-width: 4px;
border-block-start-color: currentcolor;
}
</style>
<p>Block start</p> How It Works Set the text color. color: #7c3aed is what currentcolor reads.Keep style and width. Without them, there is no line to color.Point color at the text. border-block-start-color: currentcolor copies that purple.Initial behavior. If you omit this property, browsers already use currentcolor by default.Example 3 — Vertical Writing Mode The color stays on the logical block-start side when writing mode flips.
<style>
p {
writing-mode: vertical-rl;
border-block-start-style: solid;
border-block-start-width: 8px;
border-block-start-color: blue;
}
</style>
<p>Block start</p> How It Works Flip the block axis. writing-mode: vertical-rl makes lines run vertically.Keep the logical color. The same border-block-start-color still targets block-start.Watch the physical edge move. The colored line is no longer locked to the top of the screen box.Why logical colors help. One rule follows writing mode instead of rewriting border-top-color or border-right-color. Edge Cases & Pitfalls If the color seems missing, check these first.
top Not the same as border-top-color border-top-color always hits the physical top. This property follows the block-start side when writing-mode changes.
short The shorthand can overwrite color Writing border-block-start: 4px solid red after your color rule replaces it. Put border-block-start-color after the shorthand, or include the color in the shorthand.
Compatibility
Browser Support border-block-start-color is a browser layout property . Node.js, Deno, and Bun do not apply it.
✓ Baseline · Widely available since 2020
border-block-start-color Chrome 69+, Firefox 41+, Safari 12.1+, Edge 79+. Internet Explorer has no support.
Google Chrome 69+
Full support
Mozilla Firefox 41+
Full support
Apple Safari 12.1+
Full support
Microsoft Edge 79+
Full support
Opera 56+
Full support
Samsung Internet 10.1+
Full support
Internet Explorer No support
None border-block-start-color Widely supported
Bottom line: Safe for modern browsers. For Internet Explorer, use a physical fallback such as border-top-color when you only need horizontal layouts.
Remember
Key Takeaways Role: color only the logical block-start border.
Needs a line: style and width must exist before color is visible.
Logical: follows writing mode. Not locked to the physical top.
Initial value: currentcolor. Not inherited.
One line: visible block-start border + border-block-start-color: blue; = a colored logical start edge.
Frequently Asked Questions What does the CSS border-block-start-color property do? It sets the color of the logical block-start border. In the default horizontal writing mode, that is usually the top border color.
What is the default value of border-block-start-color? The initial value is currentcolor, which uses the element’s text color for the block-start border.
Why is my border-block-start-color not visible? This property only sets color. You also need a visible border-block-start-style such as solid and a width greater than zero.
How is border-block-start-color different from border-top-color? border-top-color always colors the physical top edge. border-block-start-color follows writing-mode, direction, and text-orientation.
Can I use hex, rgb, or hsl values? Yes. Any valid CSS <color> works, including named colors, hex, rgb(), hsl(), currentcolor, and transparent.
Which browsers support border-block-start-color? Chrome 69+, Firefox 41+, Safari 12.1+, and Edge 79+ support it. Internet Explorer does not. It is a browser layout property, not a Node.js feature.
About the author Developer, cloud engineer, and technical writer
I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.
8 people found this page helpful
Helpful Share Copy link Suggestion