Fraction unit

noun

say it: “FRAK-shun YOO-nit” /ˈfrækʃən ˈjuːnɪt/

The CSS fr unit: one share of the space left over in a grid.

What is the fr unit?

The fraction unit (fr) shares out the leftover space in a grid. 1fr 2fr gives the second column twice as much.

.layout { display: grid; grid-template-columns: 1fr 2fr; }

In a sentence

  • “With the fr unit, 2fr 1fr makes the first column twice as wide as the second.”

Level: Journeyman · More CSS terms at this level

Updated