пишу так:
a {
if &[href $='.pdf'] {$typecontent: '\f1c1';}
if &[href $='.xls'] or &[href $='.xlsx'] {$typecontent: '\f1c3';}
if &[href $='.doc'] or &[href $='.docx'] {$typecontent: '\f1c2';}
if &[href $='.ppt'] or &[href $='.pptx'] {$typecontent: '\f1c4';}
if &[href $='.zip'] or &[href $='.7zip'] or &[href $='.rar'] {$typecontent: '\f1c6';}
else {$typecontent: '';}
}
.dsize {
color: $wite;
&::before {
margin-right: .5em;
font-family: "Font Awesome 5 Free";