▲ | capitainenemo 4 days ago | |
This seems like a good opportunity to bring up the old, more hacky, but also more performant and predictable CSS random effect using backgrounds of prime number sizes to achieve a "random" distribution. The "cicada principle" https://www.sitepoint.com/the-cicada-principle-and-why-it-ma... https://lea.verou.me/blog/2020/07/the-cicada-principle-revis... In this case you would use multiple transparent tiles of different star patterns (images, or gradient/clip-path tricks), each one a different prime number in size. It should work with anything you can tile and overlay in CSS though. | ||
▲ | pstuart 4 days ago | parent | next [-] | |
I'm not sure if I'll ever get a chance to use that but it was very informative nonetheless. | ||
▲ | capitainenemo 4 days ago | parent | prev [-] | |
(oh, I should note that the 2nd link uses nth selector to apply any rules pseudo-randomly, not just tiles) ... and, hm, I guess you could "seed" the pseudorandom nth selectors if your pages had unique attribute selectors, by adjusting the primes and offsets. Like with drupal you could do different ones based on digits of the nid in the body tag. |