nitter/src/sass/profile/photo-rail.scss

96 lines
1.8 KiB
SCSS
Raw Normal View History

2019-09-13 08:44:21 +00:00
@import '_variables';
.photo-rail {
&-card {
float: left;
background: var(--bg_panel);
2019-09-13 08:44:21 +00:00
border-radius: 0 0 4px 4px;
width: 100%;
margin: 5px 0;
}
&-header {
padding: 5px 12px 0;
}
&-header-mobile {
display: none;
2020-06-01 00:22:22 +00:00
box-sizing: border-box;
padding: 5px 12px 0;
width: 100%;
2019-09-13 08:44:21 +00:00
float: unset;
color: var(--accent);
2019-09-13 08:44:21 +00:00
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;
2019-09-13 08:44:21 +00:00
}
2022-01-06 14:21:42 +00:00
@media(max-width: 700px) {
2019-09-13 08:44:21 +00:00
.photo-rail-header {
display: none;
}
.photo-rail-header-mobile {
display: flex;
2019-09-13 08:44:21 +00:00
}
.photo-rail-grid {
max-height: 0;
padding-bottom: 0;
overflow: hidden;
transition: max-height 0.4s;
}
.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;
}
}