1
0
mirror of https://github.com/danbee/my-images synced 2025-03-04 08:49:05 +00:00
my-images/app/assets/stylesheets/images/index.scss

64 lines
1.1 KiB
SCSS

.images {
display: grid;
grid-gap: 0.75rem;
grid-template-columns: repeat(2, 1fr);
justify-content: space-between;
list-style: none;
margin-bottom: 0;
margin-top: 0;
padding-left: 0;
li {
margin-bottom: 1em;
}
img {
background-color: white;
max-width: calc(100% - 0.5rem);
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
border-radius: 2px;
padding: 0.25rem;
}
&__upload {
aspect-ratio: 1 / 1;
&-form {
height: 100%;
}
&-label {
align-items: center;
border-radius: 2px;
outline: 1px dashed white;
display: flex;
flex-direction: column;
height: 100%;
justify-content: center;
opacity: 0.4;
width: 100%;
cursor: pointer;
}
&-input {
display: none;
}
}
}
@media (min-width: 380px) {
ul.images { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 590px) {
ul.images { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 820px) {
ul.images { grid-template-columns: repeat(5, 1fr); }
}
@media (min-width: 1000px) {
ul.images { grid-template-columns: repeat(6, 1fr); }
}