CKTIS / CSS
border-right-color — right border color
The border-right-color property sets the color of an element’s physical right border. It changes neither width nor style; its initial currentColor value refers to the same element’s color property.
Version: CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
Syntax
border-right-color: <color>;
/* Global keywords */
border-right-color: inherit | initial | unset | revert | revert-layer;border-right-color accepts one <color> value, such as a named color, hexadecimal notation, rgb(), transparent, or currentColor. Its initial value is currentColor, and the property is not inherited. It targets the physical right edge, not the text axis’s direction-dependent end.
Color alone does not create a visible line: a nonzero width and a style other than none or hidden are also needed. transparent hides the color without removing the border’s width. The border, border-right, and border-color shorthands can overwrite this color according to the cascade; the example places the longhand after border.
The syntax shown describes Level 3 color values. The Level 4 draft extends the grammar with <image-1D>; this does not establish support in Chromium 152. The example deliberately uses only a <color> value. It passed an isolated check in Chromium 157.0.8103.51, but that result does not establish how it behaves in Chromium 152. If Chromium 152 is your target, verify the example locally in that version.
Examples
<!doctype html>
<html lang="en">
<meta charset="utf-8">
<title>border-right-color</title>
<style>
#sample {
width: 160px;
padding: 12px;
border: 2px solid black;
border-right-width: 8px;
border-right-color: rgb(0, 102, 204);
}
</style>
<div id="sample">CSS</div>
<script>
const sample = document.getElementById('sample');
console.log(getComputedStyle(sample).borderRightColor);
</script>
</html>Result
rgb(0, 102, 204)
The displayed code and declared result were verified in an isolated environment using the method recorded in the verification evidence for this exact version.