Files
ARTEX/web/public
Pedro Gomes b61306f7a8 web: ship the logo at display size, and serve WebP when the browser takes it
logo.png was a 1920x1920 RGBA render (492 KB) used as a 40 px sidebar mark, a
160 px login mark, and the favicon. It was the single largest item on the page:
32% of the 1.55 MB asset budget, and incompressible, so it outweighed the entire
gzip saving from the caching work in #404.

- public/logo.png   1920 -> 512 (3x the largest 160 px display)   492 KB -> 71 KB
- public/logo.webp  new, same 512 art                             492 KB -> 28 KB
- app/icon.png      1920 -> 192 (favicon)                         492 KB -> 17 KB

The three <img src=/logo.png> sites sit in a <picture> with a WebP source and the
PNG as fallback. The wrapper needs className="contents": <picture> is
display:block by default, so as a flex item it took over the image's layout slot
and — in the collapsed sidebar, whose button is size-8 with p-2 — the logo came
out at 3.5 px instead of the ~16 px it had. With display:contents the wrapper
generates no box and the <img> is the flex item again; measured in the built
export, an <img width=40> in that button is 16x16 px with the bare-img markup,
3.52x3.52 with a plain <picture> wrapper, and 16x16 with <picture
className="contents">. The login/setup marks measure 160x160 either way.

No component or CSS changes beyond the wrapper; the built CSS contains
.contents{display:contents}.
2026-11-22 14:44:51 +00:00
..
2026-07-26 04:27:45 -04:00