Files

23 lines
812 B
Markdown
Raw Normal View History

2018-10-12 15:37:13 -04:00
---
title: Limit Item Size Using the minmax Function
2018-10-12 15:37:13 -04:00
---
# Limit Item Size Using the minmax Function
---
## Problem Explanation
2018-10-12 15:37:13 -04:00
Using the *minmax* function in conjunction with the *repeat* function is exactly what this challenge describes, but this was not inherently obvious to me at first. The way to pass this challenge is to remove the **max-width** value within the *repeat* function, and then add the *minmax* function in place of the *repeat* **max-width** value.
Here is an **example** of what that looks like using a *before* and *after* approach:
**Before**
2018-10-12 15:37:13 -04:00
```css
grid-template-columns: repeat(3, 1fr);
```
**After**
2018-10-12 15:37:13 -04:00
```css
grid-template-columns: repeat(3, minmax(50px, 2fr));
```
---
#### Relevant Links[Mozilla Developer Network](https://developer.mozilla.org/en-US/docs/Web/CSS/minmax)