Rule-style - CSS Property
Summary of characteristics of the rule-style property
none | solid | double | dotted | dashed | ridge | groove | inset | outsetnoneDiscrète: during an animation, the rule-style property passes from one value to another without transition.Per grammar: serialization in the order of syntax.Syntax diagram of rule-style.
In the diagram, the bold terms are the predefined words of CSS, the other terms are described below:
- Multiple values can be listed by separating the values with a comma.
Description of the rule-style property.
{rule-style draws horizontal and vertical lines in a grid container or any other container that displays blocks in rows or columns.
These lines separate the rows and columns. rule-style also lets you set the style used for the lines. In the examples below, a double
line has been chosen.
⚠ If that doesn't seem to work, try using another browser, like or .
rule-style on a grid container.rule-style on a flex-box container.rule-style is a property that lets you apply the same line style to the separators between rows and columns:
Refer to the page on rule, which is a summary of the properties related to separation lines.
Values for rule-style.
- rule-style: none;
The nets separating the rows and those separating the columns aren't drawn.
ABCDEFGHIJKLMNOPQRSTUVWXYZrule-style:none; - rule-style: solid;
Several line styles are available. You can find the same styles as for the borders.
solid
A simple line.dotted
A series of dots.dashed
A series of dashes.inset
A line with a 3D dug effect.outset
A line with a 3D embossed effect.(1) For
doubleand 3D effects to be visible, you need to select a thickness of at least 4 pixels. The 3D effects correspond togroove,ridge,inset, andoutset.ABCDEFGHIJKLMNOPQRSTUVWXYZrule-style:double; - rule-style: solid; dotted; rule-style: repeat(2,solid), double;
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
repeat()function is accepted. It is especially useful if the number of lines is large. Check the function description for more details on its syntax.ABCDEFGHIJKLMNOPQRSTUVWXYZrule-style:solid, dotted; - rule-style: initial; (
none) rule-style: inherit; rule-style: revert; rule-style: revert-layer; rule-style: revert-rule; rule-style: unset;Common values are presented on these pages:
initial,inherit,revert,revert-layer,revert-rule,unset.
Animation of the rule-style property.
The animation of rule-style can be done, but in a discontinuous way (a sudden jump from one value to another),
which makes sense since the property only accepts discontinuous values.
Simulator.
The simulator shows a grid container and a flex container. You can change the value of rule-style for both of these containers.
J
Browsers compatibility with rule-style.
The rule-style property is still not widely recognized. For now (2026), only by , , and a few browsers.
rule-style property, which sets the same line styles for vertical rules (column separation) and horizontal rules (row separation) in a grid, flex-box, etc.column-rule-style in the case of a multi-column layout.row-rule-style property that sets the line style for row separators in a grid, flex-box, etc.rule-styleproperty
column-rule-styleproperty
row-rule-styleproperty
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-style 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-styleIntroduction of therule-styleproperty, as well as other properties related to borders.April 17, 2025Working Draft.
See also, about gap decorations.
A new specification has been created to define all the properties related to line and column dividers: CSS Gap Decorations Module.. These properties are the following:



