Row-rule - CSS Property
Summary of characteristics of the row-rule property
Per grammar: serialization in the order of syntax.Values can be entered in any order.
Syntax diagram of row-rule.
In the diagram, the bold terms are the predefined words of CSS, the other terms are described below:
row-ruleis a shorthand property that brings togetherrow-rule-width,row-rule-style, androw-rule-color. On the diagrams, these terms correspond to the syntaxes of the respective properties. Refer to their respective pages.- The syntax can be repeated several times with a comma as a separator.
Description of the row-rule property.
In a grid container, a flex container, or any other container that might display block lines, row-rule draws separating lines between the rows.
You can adjust the color, style, and thickness of these lines.
row-rule is a shorthand property that allows you to define the following properties in a single rule:
row-rule does not insert a line before the first line or after the last one. The lines are really just line dividers and only appear
between two rows.
The thickness of the line doesn't add to the one defined by row-gap.
See the page on rule for a summary of the properties related to separating nets.
Values for row-rule.
- row-rule: 3px solid blue;
This is the simplest syntax for
row-rule: we set the values for each of the properties. These values apply to all horizontal separating lines.ABCDEFGHIJKLMNOPQRSTUVWXYZrow-rule:3px solid blue; - row-rule: 3px solid blue, 5px double red; row-rule: repeat(5, 5px solid blue), double;
Several groups of values separated by commas. Each group of values applies to a separator line. If there are more lines than values, the list is reread from the beginning.
The
repeat()function is accepted and useful when the number of lines is large. Refer to the function description for more details on its syntax.ABCDEFGHIJKLMNOPQRSTUVWXYZrow-rule:3px solid blue, 5px double red; - row-rule: initial; row-rule: inherit; row-rule: revert; row-rule: revert-layer; row-rule: revert-rule; row-rule: unset;row-rule-width: initial; (
medium) row-rule-width: inherit; row-rule-width: revert; row-rule-width: revert-layer; row-rule-width: revert-rule; row-rule-width: unset;row-rule-style: initial; (none) row-rule-style: inherit; row-rule-style: revert; row-rule-style: revert-layer; row-rule-style: revert-rule; row-rule-style: unset;row-rule-color: initial; (currentcolor) row-rule-color: inherit; row-rule-color: revert; row-rule-color: revert-layer; row-rule-color: revert-rule; row-rule-color: unset;These values are described in more detail on their respective page:
initial,inherit,revert,revert-layer,revert-rule,unset.
Animation of the row-rule property.
The animation of row-rule is possible. It is gradual on the values corresponding to row-rule-width and row-rule-color,
and discrete (abrupt) on row-rule-style. See other examples of animation on the individual properties.
Simulator.
The simulator shows a grid container where you can change the value of row-rule.
Browsers compatibility with row-rule.
The row-rule property is still too little known. For now (2026), only and recognize it.
row-rule property that sets the parameters for row separators in a grid, flexbox, etc.row-rule-width property, which sets the thickness of the row separators in a grid, flex-box, etc.row-rule-style property that sets the line style for row separators in a grid, flex-box, etc.row-rule-color property, which sets the color of row separators in a grid container, flexbox, etc.row-ruleproperty
row-rule-widthproperty
row-rule-styleproperty
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 row-rule 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.
Regardingrow-ruleExtension of the propertycolumn-ruleto extend it to the setting of line separation in a grid container or a flex-box container.April 17, 2025Working Draft.
See also, about gap decorations.
The decorative lines are described in the new CSS Gap Decorations Module.. Here are the other properties listed in this module:



