css-atoms
Version:
A legal way of doing inline css
18 lines (14 loc) • 388 B
text/less
.width(@list, @separator) {
.loop(@index) when (@index > 0) {
@pair: extract(@list, @index);
@class-name: e(extract(@pair, 1));
@value: extract(@pair, 2);
@important-flag: e(extract(@pair, 3));
.width@{separator}@{class-name} {
width: @value @important-flag;
}
.loop(@index - 1);
}
.loop(length(@list));
}
.width(@width-list, @width-separator);