grid images scale correctly
This commit is contained in:
@@ -22,14 +22,18 @@
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
/* dense image grid : ~200px cells, flexible down to phone widths,
|
||||
same max width as the .cv container */
|
||||
/* image grid, pure grid (no media queries) : the column count follows
|
||||
the container width automatically. min(220px, 48%) => max 4 columns
|
||||
at 1100px (5x220px doesn't fit) and never less than 2 columns
|
||||
(2x48% + gap always fits). Same max width as the .cv container */
|
||||
.images_grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
|
||||
grid-template-columns: repeat(auto-fill, minmax(min(220px, 48%), 1fr));
|
||||
gap: 10px;
|
||||
width: auto;
|
||||
max-width: 1100px;
|
||||
/* definite width tracking the viewport (the parent grid column is
|
||||
auto-sized, so width:auto would stay at max-content = 1100px),
|
||||
capped at the same max width as the .cv container */
|
||||
width: min(1100px, calc(100vw - 20px));
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
|
||||
Reference in New Issue
Block a user