mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-09-30 19:21:33 +02:00
Switching a card from M to XL made it wider, enlarged the printer name and the thumbnail, and left everything else where it was. The AMS slot labels, temperatures, filament names, status text and every small button stayed pinned between 8 and 11 pixels -- under the smallest size used anywhere else in the app -- so a full-width card carried the same tiny text as the compact one. Browser zoom does not answer this: it enlarges the whole page and so preserves the very disparity being reported. The card root now carries ten custom properties derived from cardSize, and the 200 fixed sizes in its subtree reference them: text-[10px] becomes text-[length:var(--pc-t10,10px)], w-3 h-3 becomes w-[var(--pc-i3,0.75rem)]. L draws the body 20% larger and XL 40%, icons included, so the controls grow with the text instead of staying fiddly to hit. Custom properties rather than an em-based root font-size. Setting font-size on the card would silently reshape any text that declares no size of its own, and would break for portalled content. Each converted class names its old fixed value as the fallback, so anything rendering outside a card root is untouched -- which is what leaves the portalled temperature popover exactly as it is. Its four sites stay fixed on purpose, as does the page chrome; the conversion was scoped from the function declarations rather than line numbers, and afterwards only those four intended sites still hold a literal px value. S and M stay at 1.0. S is the dense fleet view where density is the point and M is the default, so an existing install looks identical until the user reaches for a size that is already asking for more room -- the same control the request asked this to follow. Wiki notes the scaling in the card-size table and why it differs from browser zoom. Tests pin the variable values at every size, including that S and M still emit the pre-change sizes.