yyzone
Version:
yyzone vue components and utils
32 lines (26 loc) • 861 B
text/less
.@{yy-css-prefix}file-logo {
display: inline-block;
font-size: 0;
@attachUrl: "../../images/file_logo/";
&-item {
display: inline-block;
width: 100%;
height: 100%;
background-size: 100%;
background-position: center;
background-repeat: no-repeat;
border: 1px solid #DFE5EA;
box-sizing: border-box;
}
@classList: doc, ppt, exl, txt, pdf, zip, sp, pic, yp, def;
@fileList: file_word, file_ppt, file_exl, file_txt, file_pdf, file_zip, file_movie, file_pic, file_music, file_other;
.loop(@i) when (@i < length(@classList)+1) {
@className: extract(@classList, @i);
@pngName: extract(@fileList, @i);
.ico_doc_@{className} {
background-image: url("@{attachUrl}/@{pngName}.svg");
}
.loop(@i+1);
}
.loop(1);
}