Skip to content

CSS repeat() function: page rewrite#44601

Open
estelle wants to merge 5 commits into
mainfrom
gaps3-repeat
Open

CSS repeat() function: page rewrite#44601
estelle wants to merge 5 commits into
mainfrom
gaps3-repeat

Conversation

@estelle

@estelle estelle commented Jun 29, 2026

Copy link
Copy Markdown
Member

repeat is no longer limited to grid. It can now be used from all the gap decoration properties.
spec: https://drafts.csswg.org/css-gaps-1/#lists-repeat

This work attempts to reduce much of the property-specific language and expand the value type to include repeat and auto-repeat for properties that accept comma separated lists of values

Part of openwebdocs/project#238

<line-width> is added in #44597
the gap decoration properties will be added soon.

@estelle estelle requested a review from a team as a code owner June 29, 2026 19:34
@estelle estelle requested review from hamishwillee and removed request for a team June 29, 2026 19:34
@github-actions github-actions Bot added Content:CSS Cascading Style Sheets docs size/m [PR only] 51-500 LoC changed labels Jun 29, 2026
@github-actions

github-actions Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Preview URLs (1 page)

Flaws (12)

Found an unexpected or unresolvable flaw? Please report it here.

URL: /en-US/docs/Web/CSS/Reference/Values/repeat
Title: repeat() CSS function
Flaw count: 12

  • macros:
    • Macro cssxref produces link /en-US/docs/Web/CSS/row-rule-color which doesn't resolve
    • Macro cssxref produces link /en-US/docs/Web/CSS/rule-color which doesn't resolve
    • Macro cssxref produces link /en-US/docs/Web/CSS/row-rule-style which doesn't resolve
    • Macro cssxref produces link /en-US/docs/Web/CSS/rule-style which doesn't resolve
    • Macro cssxref produces link /en-US/docs/Web/CSS/row-rule-width which doesn't resolve
    • and 7 more flaws omitted

(comment last updated: 2026-06-30 08:48:53)

---

The **`repeat()`** [CSS](/en-US/docs/Web/CSS) [function](/en-US/docs/Web/CSS/Reference/Values/Functions) represents a repeated fragment of the [track list](/en-US/docs/Web/CSS/Guides/Grid_layout/Basic_concepts), allowing a large number of columns or rows that exhibit a recurring pattern to be written in a more compact form.
The **`repeat()`** [CSS](/en-US/docs/Web/CSS) [function](/en-US/docs/Web/CSS/Reference/Values/Functions) represents a repeated fragment of the [track list](/en-US/docs/Web/CSS/Guides/Grid_layout/Basic_concepts) or [rule-line list], allowing a large number of columns and rows, and their gap decorations, that exhibit a recurring pattern to be written in a more compact form.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it were me, short choppy sentences. This might not be right, but something to consider.

Suggested change
The **`repeat()`** [CSS](/en-US/docs/Web/CSS) [function](/en-US/docs/Web/CSS/Reference/Values/Functions) represents a repeated fragment of the [track list](/en-US/docs/Web/CSS/Guides/Grid_layout/Basic_concepts) or [rule-line list], allowing a large number of columns and rows, and their gap decorations, that exhibit a recurring pattern to be written in a more compact form.
The **`repeat()`** [CSS](/en-US/docs/Web/CSS) [function](/en-US/docs/Web/CSS/Reference/Values/Functions) represents a repeated fragment of the [track list](/en-US/docs/Web/CSS/Guides/Grid_layout/Basic_concepts) or [rule-line list]. It allows repeated patterns of columns, rows, and their gap decorations, to be written in a compact form.

- an integer to set the repeat count
- [`<fixed-size>`](#fixed-size) values to set track sizes.
- {{cssxref("integer")}}
- : An positive integer greater than or equal to `1` specifying the number of times the second parameter feature list will be repeated.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- : An positive integer greater than or equal to `1` specifying the number of times the second parameter feature list will be repeated.
- : An positive integer greater than or equal to `1` specifying the number of times the feature list in the second parameter will be repeated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:CSS Cascading Style Sheets docs size/m [PR only] 51-500 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants