web publishing magazine

CSS Grid —
More flexibility with minmax()

CSS Grid is a great way to create complex layouts. But sometimes you need a little more flexibility to set the width of the columns. This is where the CSS function minmax() comes in. Here you will find a very good description of how to use this CSS function.

minmax() is a function that can be used in your grid-template-columns or grid-template-rows property to size your grid tracks. It takes (you guessed it) a minimum value and a maximum value, which can be a length (pixels, ems, etc.), a percentage, a flexible fr unit or a keyword.