tech/webdev magazine

October 23, 2016

Magic randomisation with nth-child and Cicada Principle

Sunday, October 23, 2016 Teklinks

The combination of nth-child and cicada principle is a clever technique used for faking the randomisation of patterns. Since computers can’t generate random numbers (e.g. math.random() in Javascript isn’t completely random), the best we can do is give it a pseudo random seed value, which is usually based on a variable that can't be predicted (like exact time, for example).

Full article