magner
Version:
Universal admin panel magnetic to any backend
145 lines (124 loc) • 2.56 kB
CSS
.el-upload {
width: 100%;
& .el-upload-dragger {
width: 100%;
height: auto;
min-height: 180px;
& .el-upload--text {
line-height: 1.2em;
}
& .icon-cloud {
margin-top: 30px;
width: 90px;
}
&.images {
display: flex;
gap: 12px;
flex-wrap: wrap;
padding: 16px;
@media (--breakpoint-small) {
padding: 10px;
}
}
}
&_card {
position: relative;
min-width: 150px;
max-width: 200px;
max-height: 200px;
background-color: rgba(0,0,0,0.05);
display: flex;
align-items: center;
justify-content: center;
&.draggable:not(.loading) {
cursor: move;
}
&.loading {
width: 150px;
height: 200px;
background-color: rgba(0,0,0,0.05);
& .el-loading-mask {
background-color: unset;
}
& img {
transform: scale(1.5);
filter: blur(3px);
}
}
&:hover {
& .el-upload_media-toolbar {
visibility: visible;
opacity: 1;
pointer-events: all;
}
}
}
&_media-image, &_media-video {
width: auto;
height: auto;
min-width: 150px;
max-height: 200px;
border-radius: 4px;
@media (--breakpoint-small) {
max-width: 100%;
}
}
&_media-file {
position: relative;
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
width: 100%;
height: 100%;
padding: 25px 8px 8px;
&_icon {
display: block;
& svg {
width: 32px;
height: 32px;
opacity: 0.6;
}
}
&_caption {
display: -webkit-box;
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
}
}
&_media-toolbar {
position: absolute;
right: 2px;
top: 2px;
display: flex;
align-items: center;
visibility: hidden;
opacity: 0;
pointer-events: none;
transition: opacity 0.2s ease-in-out;
& .el-button {
width: 32px;
border-radius: 50%;
}
}
&.dragover * {
pointer-events: none;
}
&.disabled {
&:focus {
border-color: transparent;
& .el-upload-dragger {
border-color: var(--el-disabled-border-base);
}
}
& .el-upload-dragger {
background-color: var(--el-disabled-fill-base);
border-color: var(--el-disabled-border-base);
color: var(--el-disabled-color-base);
cursor: not-allowed;
}
}
}