Currently, you cannot dynamically call as you wish. You can, however, customize it a little differently using pattern matching , for example:
.typography(xs){
font-family: Arial;
font-size: 16px;
line-height: 22px;
}
.typography-demo(@typographyName) {
@{typographyName} {
&:before{content: '@{typographyName}';}
.typography(@typographyName);
}
}
.typography-demo(xs);
Using pattern matching, you can create other patterns, for example:
.typography(xl){
font-family: Arial;
font-size: 32px;
line-height: 44px;
}
.typography(times){
font-family: 'Times New Roman';
font-size: 16px;
line-height: 22px;
}
xl times . , , (, -xs), , mixins.
, @{typographyName} :
.typography-demo(@typographyName, @selector: ~".") {
@{selector}@{typographyName} {
&:before{content: '@{typographyName}';}
.typography(@typographyName);
}
}
, , id @{typographyName}.