CKTIS / CSS
border-right-style — right border line style
The border-right-style property sets the pattern of the physical right border. It does not set its color or thickness. Its initial value, none, disables that border.
Version: CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
Syntax
border-right-style: none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset;border-right-style sets the style of the physical right border, regardless of text direction. It is not inherited; its initial value is none. It accepts one keyword, not a set of values for four sides.
dotted, dashed, solid, and double mean dots, dashes, a continuous line, and two lines respectively. groove and ridge create carved and raised ridge effects; inset and outset make the box look sunken or raised. For double, the thickness includes both lines and their gap.
none and hidden draw no border. Under CSS Backgrounds and Borders Level 3, the computed value of border-right-width is zero with either style. In collapsed-border tables, hidden suppresses competing borders, whereas none has the lowest priority.
Set color and thickness with border-right-color and border-right-width. Setting thickness alone is insufficient when the style is none. The border-right, border-style, and border shorthands can overwrite this property. The example reads the style and width before and after switching to none. For the rendered box in this example, getComputedStyle() returns 0px as the resolved width after the switch. That is the used width, which is zero with none even if the computed width is nonzero.
Examples
<!doctype html>
<meta charset="utf-8">
<title>border-right-style</title>
<style>
#box {
width: 120px;
height: 40px;
border-right-width: 6px;
border-right-color: #000;
border-right-style: solid;
}
</style>
<div id="box"></div>
<pre id="result"></pre>
<script>
const box = document.getElementById('box');
const result = document.getElementById('result');
const read = () => {
const style = getComputedStyle(box);
return `${style.borderRightStyle} | ${style.borderRightWidth}`;
};
const before = read();
box.style.borderRightStyle = 'none';
result.textContent = `${before}\n${read()}`;
</script>Result
solid | 6px none | 0px
The displayed code and declared result were verified in an isolated environment using the method recorded in the verification evidence for this exact version.