css - Nesting and looping with less incremental -


i not sure how implement in less, not sure start.

the purpose increment padding variable(15px in example) depth (increment variable). possible in less?

ul {   li{     padding-left: 30px;   }   ul {     li{       padding-left: 45px;     }     ul {       li{         padding-left: 60px;       }       ul {         li{           padding-left: 75px;         }         ul {           li{             padding-left: 90px;           }         }       }     }   } } 

see loops, e.g.:

.make-nested-lists(5);  .make-nested-lists(@n, @i: 0) when (@i < @n) {     ul li {         padding-left: (30px + 15 * @i);         .make-nested-lists(@n, (@i + 1));     } } 

Comments

Popular posts from this blog

php - Magento - Deleted Base url key -

javascript - Tooltipster plugin not firing jquery function when button or any click even occur -

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -