97 lines
1.8 KiB
SCSS
97 lines
1.8 KiB
SCSS
@import '_variables';
|
|
|
|
.photo-rail {
|
|
&-card {
|
|
float: left;
|
|
background: $bg_panel;
|
|
border-radius: 0 0 4px 4px;
|
|
width: 100%;
|
|
margin: 5px 0;
|
|
}
|
|
|
|
&-header {
|
|
padding: 5px 12px 0;
|
|
}
|
|
|
|
&-header-mobile {
|
|
padding: 5px 12px 0;
|
|
display: none;
|
|
width: calc(100% - 24px);
|
|
float: unset;
|
|
color: $accent;
|
|
justify-content: space-between;
|
|
}
|
|
|
|
&-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(4, 1fr);
|
|
grid-gap: 3px 3px;
|
|
padding: 5px 12px 12px;
|
|
|
|
a {
|
|
position: relative;
|
|
border-radius: 5px;
|
|
|
|
&:before {
|
|
content: "";
|
|
display: block;
|
|
padding-top: 100%;
|
|
}
|
|
}
|
|
|
|
img {
|
|
height: 100%;
|
|
width: 100%;
|
|
border-radius: 4px;
|
|
object-fit: cover;
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
bottom: 0;
|
|
right: 0;
|
|
}
|
|
}
|
|
}
|
|
|
|
@include create-toggle(photo-rail-grid, 640px);
|
|
#photo-rail-grid-toggle:checked ~ .photo-rail-grid {
|
|
padding-bottom: 12px;
|
|
}
|
|
|
|
@media(max-width: 600px) {
|
|
.photo-rail-header {
|
|
display: none;
|
|
}
|
|
|
|
.photo-rail-header-mobile {
|
|
display: flex;
|
|
}
|
|
|
|
.photo-rail-grid {
|
|
max-height: 0;
|
|
padding-bottom: 0;
|
|
overflow: hidden;
|
|
transition: max-height 0.4s;
|
|
}
|
|
}
|
|
|
|
@media(max-width: 600px) {
|
|
.photo-rail-grid {
|
|
grid-template-columns: repeat(6, 1fr);
|
|
}
|
|
|
|
#photo-rail-grid-toggle:checked ~ .photo-rail-grid {
|
|
max-height: 300px;
|
|
}
|
|
}
|
|
|
|
@media(max-width: 450px) {
|
|
.photo-rail-grid {
|
|
grid-template-columns: repeat(4, 1fr);
|
|
}
|
|
|
|
#photo-rail-grid-toggle:checked ~ .photo-rail-grid {
|
|
max-height: 450px;
|
|
}
|
|
}
|