css-atoms
Version:
A legal way of doing inline css
18 lines (14 loc) • 412 B
text/less
.max-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));
.max-width@{separator}@{class-name} {
max-width: @value @important-flag;
}
.loop(@index - 1);
}
.loop(length(@list));
}
.max-width(@max-width-list, @max-width-separator);