December, 2012
Iterations in Less
Part of the beauty of Less and other CSS ‘compilers’ is to enable the author to automate tedious functions that normally must be coded by hand. Suppose you needed several classes that specified padding/margins: .mRight50{margin-right:50px} .mLeft50{margin-left:50px} .pRight50{padding-right:50px} .pLeft50{padding-left:50px} .mRight25{margin-right:25px} .mLeft25{margin-left:25px} .pRight25{padding-right:25px} .pLeft25{padding-left:25px} No big deal, right? It wouldn’t take that long to type in; just cut and paste a bit. …
0
11
Dec
Posted:
December 11, 2012 Tuesday at 10:54 pm
