163 lines
2.4 KiB
CSS
163 lines
2.4 KiB
CSS
.root {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 22px;
|
|
}
|
|
|
|
.dropzone {
|
|
position: relative;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 8px;
|
|
min-height: 148px;
|
|
padding: 28px 20px;
|
|
border: 1px dashed #d4d4d4;
|
|
border-radius: 6px;
|
|
background:
|
|
radial-gradient(circle at 1px 1px, #ececec 1px, transparent 0) 0 0 / 18px 18px,
|
|
#fafafa;
|
|
color: var(--color-muted);
|
|
cursor: pointer;
|
|
transition:
|
|
border-color 0.15s ease,
|
|
background-color 0.15s ease,
|
|
color 0.15s ease;
|
|
}
|
|
|
|
.dropzone:hover,
|
|
.dropzoneActive {
|
|
border-color: var(--color-black);
|
|
background-color: #f5f5f5;
|
|
color: var(--color-black);
|
|
}
|
|
|
|
.dropzoneBusy {
|
|
pointer-events: none;
|
|
opacity: 0.72;
|
|
}
|
|
|
|
.dropIcon {
|
|
width: 36px;
|
|
height: 36px;
|
|
opacity: 0.55;
|
|
}
|
|
|
|
.dropTitle {
|
|
margin: 0;
|
|
font-size: 13px;
|
|
font-weight: 500;
|
|
letter-spacing: 0.08em;
|
|
text-transform: uppercase;
|
|
}
|
|
|
|
.dropHint {
|
|
margin: 0;
|
|
font-size: 12px;
|
|
font-weight: 400;
|
|
letter-spacing: 0.02em;
|
|
color: var(--color-soft);
|
|
}
|
|
|
|
.fileInput {
|
|
position: absolute;
|
|
inset: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
opacity: 0;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.error,
|
|
.hint {
|
|
margin: 0;
|
|
font-size: 13px;
|
|
font-weight: 400;
|
|
color: var(--color-muted);
|
|
}
|
|
|
|
.error {
|
|
color: #b42318;
|
|
}
|
|
|
|
.masonry {
|
|
columns: 3;
|
|
column-gap: 14px;
|
|
}
|
|
|
|
.item {
|
|
position: relative;
|
|
break-inside: avoid;
|
|
margin: 0 0 14px;
|
|
border-radius: 5px;
|
|
overflow: hidden;
|
|
background: #f3f3f3;
|
|
}
|
|
|
|
.item img {
|
|
display: block;
|
|
width: 100%;
|
|
height: auto;
|
|
vertical-align: top;
|
|
}
|
|
|
|
.fallback {
|
|
min-height: 140px;
|
|
background: linear-gradient(135deg, #efefef, #e2e2e2);
|
|
}
|
|
|
|
.itemFoot {
|
|
position: absolute;
|
|
inset: auto 0 0 0;
|
|
display: flex;
|
|
justify-content: flex-end;
|
|
padding: 10px;
|
|
opacity: 0;
|
|
transition: opacity 0.15s ease;
|
|
}
|
|
|
|
.item:hover .itemFoot,
|
|
.item:focus-within .itemFoot {
|
|
opacity: 1;
|
|
}
|
|
|
|
.removeBtn {
|
|
border: 0;
|
|
border-radius: 4px;
|
|
padding: 6px 10px;
|
|
font-size: 10px;
|
|
font-weight: 500;
|
|
letter-spacing: 0.1em;
|
|
text-transform: uppercase;
|
|
color: #fff;
|
|
background: #111;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.removeBtn:hover {
|
|
background: #b42318;
|
|
}
|
|
|
|
.removeBtn:disabled {
|
|
opacity: 0.6;
|
|
cursor: wait;
|
|
}
|
|
|
|
@media (max-width: 960px) {
|
|
.masonry {
|
|
columns: 2;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 640px) {
|
|
.masonry {
|
|
columns: 1;
|
|
}
|
|
|
|
.dropzone {
|
|
min-height: 120px;
|
|
padding: 22px 16px;
|
|
}
|
|
}
|