Skip to content
Tutorials Center
My learning

Topics

CSS Reference ยท Multi-column and Fragmentation

The column-rule-color property

Reference for the CSS column-rule-color property: set the color of the line between columns in a multi-column layout, with examples and usage notes.

The column-rule-color property sets the color of the line drawn between the columns of a multi-column container. It is one of the three longhands of the column-rule shorthand.

By default the color is currentcolor, so the rule matches the text. The color only matters when the rule has a visible style and width; with the default style of none, nothing is drawn.

CSS
.article {
  column-count: 2;
  column-rule-style: solid;
  column-rule-width: 3px;
  column-rule-color: tomato;
}

Try it

Coloring the column rule

Syntax

CSS
column-rule-color: <color>;
  • Initial value: currentcolor
  • Applies to: multi-column containers
  • Inherited: no
  • Animatable: yes, as a color
  • Computed value: the computed color

Values

Value Description
<color> Any color value: a name, #hex, rgb(), hsl(), oklch() and so on, including transparency.
currentcolor The element's color value. This is the default.

Usage notes

  • No style, no line. Setting only the color has no visible effect until column-rule-style is something other than none.
  • It follows the text color by default. Changing color on the container also changes the rule, unless you set column-rule-color explicitly.
  • Transparent colors. transparent keeps the layout but hides the line, which is handy for animating a rule in or out.
  • Transitions work. Because the color is animatable, a transition can fade the rule on hover.
  • Contrast. Decorative rules do not need high contrast, but a rule that separates unrelated content should still be visible against the background.

Browser support

Supported in all current major browsers.