repeat()

noun

say it: “rih-PEET” /rɪˈpit/

A CSS function that writes the same row or column size several times for you, such as repeat(4, 1fr) for four equal columns.

What does repeat() do in a grid?

repeat() writes the same track size several times without typing it out.

.gallery { display: grid; grid-template-columns: repeat(4, 1fr); }

In a sentence

  • “repeat() saved me from typing 1fr four times in a row.”

Level: Journeyman · More CSS terms at this level

Updated