Tried searching for this but it\'s difficult given the syntax. Is there any way to generate a random number in LESS? I checked the documentation and don\'t see anything, b
According to the documentation:
JavaScript evaluation JavaScript expressions can be evaluated as values inside .less files. We recommend using caution with this feature as the LESS will not be compilable by ports and it makes the LESS harder to maintain. If possible, try to think of a function that can be added to achieve the same purpose and ask for it on github. We have plans to allow expanding the default functions available. However, if you still want to use JavaScript in .less, this is done by wrapping the expression with back-ticks:
So this should work:
@var: `Math.random()`;