- for (var x = 0; x < 64; x++)
  .column
View Compiled
/* randomColor:
	LESS mixin that generates 
	random hex color code.
	gist: https://gist.github.com/juanbrujo/7e4e17428dc8881d0e7e
*/

// The mixin:
.randomColor(){
  @randomColor: `Math.floor(Math.random()*16777215).toString(16)`;
  @colorHex: e(@randomColor);
  @color: ~"#@{colorHex}";
}

// Use:

@loop: 64;

.column {
  width: 100%/@loop;
  height: 100%;
  position: relative;
  float: left;
  
  .loop (@index) when (@index > 0){
    &:nth-of-type(@{index}){
      // INIT randomColor
      .randomColor();
  		background-color: @color;
      // END randomColor
    }
    .loop (@index - 1);
  }
  .loop(0){}
  .loop(@loop);
  
}

// GENERAL STYLE
html,body{height:100%;}
body {
  background: black;
}
View Compiled

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.