Can LESS generate a random number and then use it to specify a random color?
Can. LESS can execute JavaScript , so you can generate a random color like this:
.randomColor(){ @randomColor: `Math.floor(Math.random()*16777215).toString(16)`; @colorHex: e(@randomColor); @color: ~"#@{colorHex}"; } body { .randomColor(); background-color: @color; }
A source.
Source: https://ru.stackoverflow.com/questions/536628/More articles:MySQL: account update, when trying to insert an existing playerText recognition from java imageDisplay user role in ASP.NET MVC viewHow to correctly spell a string in javaHow to create your own template in Android StudioProblems with php queries, mysqlMeteor: does not find the template when loading the application on the productionWork with 2captcha.com | c #How to distribute a site from a computer via WiFi (ArchLinux)?using extension operator fails test convert to stringAll Articles