.loop (@start, @end, @step, @className,@propertyName) when (@start < @end) {
.@{className}-@{start} {
@{propertyName}: @start * 1px;
}
.loop (@start + @step, @end, @step, @className, @propertyName);
}
.loop(12,48,2,fs,font-size);
I want loop css common class,but throw Error,I don't where the error is on. for example:
.fs-12{
font-size:12px;
}
.fs-13{
font-size:13px;
}
.mt-13{
margin-top:13px;
}
.loop (@start, @end, @step, @className,@propertyName) when (@start < @end) {
.@{className}-@{start} {
@{propertyName}: (@start * 1px);
}
.loop ((@start + @step), @end, @step, @className, @propertyName);
}
.loop(12,48,2, fs, font-size);
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.