Use CSS grid for gallery styles (#1246)
Co-authored-by: Ismail El Korchi <ismail.elkorchi@gmail.com>
This commit is contained in:
parent
a9699ffb9b
commit
50ce93c7cd
2 changed files with 25 additions and 23 deletions
|
@ -1,19 +1,20 @@
|
|||
.gallery {
|
||||
margin-bottom: 1.5em;
|
||||
display: grid;
|
||||
grid-gap: 1.5em;
|
||||
}
|
||||
|
||||
.gallery-item {
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
vertical-align: top;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
// Loops to enumerate the classes for gallery columns.
|
||||
@for $i from 2 through 9 {
|
||||
// Loops to enumerate the classes for gallery columns.
|
||||
@for $i from 2 through 9 {
|
||||
|
||||
.gallery-columns-#{$i} & {
|
||||
max-width: map-get($columns, $i);
|
||||
}
|
||||
.gallery-columns-#{$i} {
|
||||
grid-template-columns: repeat($i, 1fr);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue