2020-05-25 23:17:29 +08:00
|
|
|
:root {
|
|
|
|
--gallery-spacing: var(--spacing);
|
|
|
|
--gallery-base-height: 240px;
|
|
|
|
}
|
|
|
|
|
|
|
|
@media screen and (max-width: 900px) {
|
|
|
|
:root {
|
|
|
|
--gallery-base-height: 200px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@media screen and (max-width: 700px) {
|
|
|
|
:root {
|
|
|
|
--gallery-base-height: 160px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@media screen and (max-width: 500px) {
|
|
|
|
:root {
|
|
|
|
--gallery-base-height: 120px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-05-24 20:37:14 +08:00
|
|
|
.gallery {
|
2020-05-25 23:17:29 +08:00
|
|
|
padding: var(--gallery-spacing);
|
|
|
|
padding-right: 0;
|
2020-05-24 20:37:14 +08:00
|
|
|
|
|
|
|
display: flex;
|
|
|
|
flex-wrap: wrap;
|
|
|
|
}
|
|
|
|
|
2020-05-25 23:17:29 +08:00
|
|
|
.gallery-item {
|
|
|
|
margin-right: -0.5px;
|
|
|
|
}
|
|
|
|
|
2020-05-24 20:37:14 +08:00
|
|
|
.gallery-item picture {
|
2020-05-25 23:17:29 +08:00
|
|
|
margin: var(--gallery-spacing);
|
2020-05-24 20:37:14 +08:00
|
|
|
|
|
|
|
display: block;
|
|
|
|
}
|
|
|
|
|
|
|
|
.gallery-item img {
|
|
|
|
display: block;
|
2020-05-25 23:17:29 +08:00
|
|
|
height: calc(var(--gallery-base-height) * 1.2); /* 320px is native size on desktop, 160px is native size on mobile */
|
2020-05-24 20:37:14 +08:00
|
|
|
width: auto;
|
2020-05-25 23:17:29 +08:00
|
|
|
object-fit: cover;
|
2020-05-24 20:37:14 +08:00
|
|
|
}
|