Knowledge baseExam Center
ENEnglish
Choose language13

CKTIS / CSS

rule-style — gap separator style

The rule-style shorthand gives column-gap and row-gap decorations the same style. It does not set the gap size, separator color, or separator thickness.

Version: CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required

Syntax

rule-style: <'column-rule-style'>;

rule-style sets both column-rule-style and row-rule-style to the same value. It does not accept two space-separated values to configure the directions independently. It accepts the syntax of column-rule-style, including comma-separated lists and repeat() notation.

Both longhands initially have none and are not inherited. Decorations occupy no space and do not change layout. gap sets spacing; separate properties control separator thickness and color.

The definition comes from a draft specification, not a support guarantee. The example requires local verification in the target Chromium 152 environment, checking both parsing and painting.

Examples

<!doctype html>
<html lang="en">
<meta charset="utf-8">
<title>rule-style</title>
<style>
  .grid {
    display: grid;
    grid-template-columns: repeat(2, 80px);
    grid-template-rows: repeat(2, 60px);
    gap: 20px;
    width: max-content;
    column-rule-width: 2px;
    row-rule-width: 2px;
    column-rule-color: #000;
    row-rule-color: #000;
    rule-style: dashed;
  }
  .grid > div { background: #ddd; }
</style>
<div class="grid">
  <div>A</div><div>B</div>
  <div>C</div><div>D</div>
</div>
</html>

Result

With rendering support: a 2×2 grid labeled A–D, with black dashed 2px separators in both 20px gaps. Without gap-decoration support: the grid remains, but separators may be absent.

The displayed code and declared result were verified in an isolated environment using the method recorded in the verification evidence for this exact version.

Sources