clone

an offline sliding-block puzzle game in gleam and lustre, with an endless ladder of puzzles ranked by search

A bar is as tall as the tallest thing it carries

Dami committed b439fc8
The two boxed icons at the right of the menu bar were sitting on its rule. Both
are drawn in ink, and a box that comes within a pixel of a line of the same
colour stops reading as a box near a line and starts reading as one shape that
has gone wrong.

The box was not the problem. bar_h is a fraction of the height it has with a
floor under it, and the floor was fourteen units — picked without reference to
what the bar actually holds. An icon is nine units of glyph, half a unit of air
each side and a hairline each side, which is twelve; the strip they sit in is
inset a unit at each end. Fourteen was therefore handing a twelve-unit box a
twelve-unit strip, and at the upscales where the fraction gives way to the floor
they met the rule exactly. Twelve and two of clearance above and below and the
two units of inset is eighteen, and that is what the floor is now derived from
rather than asserted.

Nothing else moves: every viewport whose fraction already cleared the floor is
untouched, and only the ones sitting on it grow.
commit
b439fc8d2f99aad07a2147f45aa177b75cebd6fd
parent
8f9d8df8c5e9215409ed8cf35798861df32e645d
author
Dami <dami.etoile@gmail.com>
2 files changed, +23 -8
Massets/styles.css17++++++++++-------
Msrc/klotski/layout.gleam14+++++++++++++-
M assets/styles.css +10 -7
M src/klotski/layout.gleam +13 -1