UNPKG

css-atoms

Version:

A legal way of doing inline css

18 lines (14 loc) 411 B
.font-weight(@list, @separator) { .loop(@index) when (@index > 0) { @pair: extract(@list, @index); @name: extract(@pair, 1); @weight: extract(@pair, 2); @important-flag: e(extract(@pair, 3)); .font-weight@{separator}@{name} { font-weight: @weight @important-flag; } .loop(@index - 1); } .loop(length(@list)); } .font-weight(@font-weight-list, @font-weight-separator);