Lab · Beta

Gather.

Every dot is an empty element. CSS throws it somewhere with the new random() function: its place, its size, its colour, its spin and how late it reacts. Scroll or drag, and the dots gather into the text you type. The text and the colour go in the address, so you can send them to someone. They get the same words, with a mess of their own.

Scroll or drag
up to gather the dots, down to scatter them
Type
new words, and the dots move to their new places
Colour
one of the site’s colours or your own, for the dots in order
Throw again
new dots, so every one of them rolls again

CSS random() works in Safari and in Chrome 156 and up. In other browsers JavaScript rolls the dice, and the line under the controls says so.

Colour

How it’s built

JavaScript makes empty elements and moves one number, --t, from 0 to 1. The rest is CSS: random() for the mess, calc() for the way back to order.

Tech
CSS random() · @property · color-mix() · Container query units · Canvas 2D · Pointer Events
Source
553 lines · 24.6 kB