Bulletin Stylist — CSS

Tidy Warta Sukamaju's CSS for pegon, an old phone and print: @layer, :has(), logical, oklch. 16 levels, played right in the browser with nothing to install.

What you learn in this game

At the Warta Sukamaju office the bulletin’s page is really opened by the browser, in a locked frame. Every chip you tap changes warta.css, and the page on the screen changes at once. Check has the browser measure what it really drew: which colour won, where boxes sit, contrast, where a tap lands. Every line of the Checking sheet is read from those measurements, never from the CSS text. @layer groups rules into layers. The layers’ order outranks selector specificity.

:has() picks an element by what it holds: an element with something inside it that matches the selector in the brackets. For twenty years CSS could only pick a child by its parent; with :has() the arrow can point the other way.

Logical properties name sides by the writing’s direction. inline is the direction of a line (left to right on the online page, right to left on the pegon page), block the direction new lines go (top to bottom). start is where a line begins, end where it ends.

@supports asks the browser opening the page: do you know this? Its rules apply only when the answer is yes. Grandma’s phone here is your own browser engine reading the stylesheet with every name newer than Chrome 75 masked. The real parser then drops them exactly as an old browser drops them.

oklch(L C H) writes a colour as lightness, chroma and hue. Its lightness is designed to follow the eye, so two colours with the same L look equally light whatever their hue. hsl() does not.

color-mix() mixes two colours in the colour space you name, with a percentage for the first. Mixing in oklch keeps the hue clean.