Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit dea6aaf

Browse files
Update explanation
1 parent f18bab2 commit dea6aaf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎snippets/css/layouts/grid-layout.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ tags: layout,grid
1212
grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
1313
/* Explanation:
1414
- `auto-fit`: Automatically fits as many columns as possible within the container.
15-
- `minmax(250px, 1fr)`: Defines a minimum column size of 250px and a maximum size of 1fr (fraction of available space).
15+
- `minmax(min(250px, 100%), 1fr)`: Defines a minimum column size of 250px and a maximum size of 1fr (fraction of available space). However, that minimum column size is allowed to shrink to fit all avalible space if the space is otherwise less than the minimum.
16+
- NOTE: the `min(x, 100%)` trick does not do much for very small sizes like 250px, but it will help massively if you increase the min column size yourself.
1617
*/
1718
}
1819
```

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /