Rule-color - CSS Property
Summary of characteristics of the rule-color property
currentcolorComputed value: during an animation, the rule-color property gradually changes from one value to another.Per grammar: serialization in the order of syntax.Syntax diagram of rule-color.
In the diagram, the bold terms are the predefined words of CSS, the other terms are described below:
color-nameis the name of a color (see Color chart).#xxxxxxis the hexadecimal code of a color.coloris a color defined by one of the syntaxes recognized by CSS. See Colors.- The syntax can be repeated by separating the values with a comma.
Description of the rule-color property.
The property rule-color applies to grid containers, flex containers, or any other container that displays blocks in rows and columns.
It sets the color of the row and column separator lines. Both types of lines get the same color. To make the lines visible, don't forget to also
set rule-style.
rule-color on a grid container.rule-color on a flex container.rule-color is a property that allows you to set the following two properties at once, with the same color:
See the page on rule for a summary of the properties related to separating nets.
Values for rule-color.
- rule-color: blue;
The lines separating the rows and those separating the columns are the indicated color. The latter can be specified with any of the syntaxes recognized by CSS (see Colors).
currentColorSets the text color of the container. Thetransparentcolor is allowed but has no effect.ABCDEFGHIJKLMNOPQRSTUVWXYZrule-color:blue; - rule-color: blue, red; rule-color: repeat(2, blue), red;
Several values separated by a comma can be specified. They apply in order to each of the lines. If the number of lines is greater than the number of values, you start again at the beginning of the list.
The function
repeat()is supported. If the number of lines is large, it makes writing easier. Refer to the function description for more details on its syntax.ABCDEFGHIJKLMNOPQRSTUVWXYZrule-color:blue, red; - rule-color: initial; (
currentcolor) rule-color: inherit; rule-color: revert; rule-color: revert-layer; rule-color: revert-rule; rule-color: unset;Common values are presented on these pages:
initial,inherit,revert,revert-layer,revert-rule,unset.
Animation of the rule-color property.
The animation of rule-color can be done very smoothly, with the colors being treated as numbers.
Simulator.
The simulator shows a grid container and a flex-box container, from which you can change the value of rule-color.
J
Browsers compatibility with rule-color.
The rule-color property is still not widely recognized. For now (2026), only , , and a few other browsers support it.
rule-color property that sets the color of row and column dividers in a grid, flexbox, etc.column-rule-color property to set the color of column separator lines in a grid, flex-box, etc.row-rule-color property, which sets the color of row separators in a grid container, flexbox, etc.rule-colorproperty
column-rule-colorproperty
row-rule-colorproperty
Browsers on computers :
Mobile browsers :
Outdated or marginal browsers :

Internet Explorer

UC Browser pour Androïd

Opéra Mobile

QQ Browser

Baidu Browser

Safari

Safari sur IOS

Opéra

Chrome

Edge

Firefox

Chrome pour Androïd

Samsung Internet

Androïd Brower

Firefox pour Androïd

KaiOS Browser

Opéra mini
Historic of the rule-color property.
-
CSS Gap Decorations Module Level 1.
This module covers the rules that define gutters between columns in a multi-column container (grid, flex-box...). It extends these possibilities to gutters between elements arranged in multiple rows, allowing these features to be used on other types of containers. Several properties define how these gutters should be drawn.
Regardingrule-colorIntroduction of lines properties includingruke-color.April 17, 2025Working Draft.
See also, about gap decorations.
The new specification CSS Gap Decorations Module. brings together everything about lines between rows or columns, in the context of a container that displays blocks in rows and/or columns (grid, flex-box, etc.). Here are the other properties described in this module:



