make column amount and min-width configurable
This commit is contained in:
@@ -1,20 +1,21 @@
|
||||
.snap-wrapper {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-around;
|
||||
justify-content: center;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
/* Create equal columns in flexbox */
|
||||
.snap-image {
|
||||
// TODO: Make this configurable with variables
|
||||
width: calc(100% / 4 - 10px);
|
||||
min-width: 200px;
|
||||
/* Create equal columns in flexbox */
|
||||
.snap-image {
|
||||
|
||||
img {
|
||||
aspect-ratio: 16/10;
|
||||
width: 100%;
|
||||
object-fit: cover;
|
||||
/* Column amount and width are configurable by style variables */
|
||||
width: calc(100% / var(--columns) - 10px);
|
||||
min-width: var(--min-width);
|
||||
|
||||
img {
|
||||
aspect-ratio: 16/10;
|
||||
width: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user