Created
February 28, 2012 17:44
-
-
Save fat/1933910 to your computer and use it in GitHub Desktop.
Looping using Recursive Guards in LESS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.spanX (@gridColumns) when (@gridColumns = 0) {} | |
.spanX (@gridColumns) when not (@gridColumns = 0) { | |
.span1 { .span(@gridColumns); } // need to find out a way to change .span1 into ".span@{gridcolumns}" | |
#grid .spanX(@gridColumns - 1); | |
} | |
.spanX(12); // this actually works |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment