mirror of
https://github.com/PR0M3TH3AN/Artstr-Studio.git
synced 2026-11-02 19:50:39 +00:00
The embed wrap was using display:flex with align-items+justify-content to center the rendered design. Flex's default flex-shrink:1 on a fixed-pixel child (the renderer creates a 720×720 box) shrinks the box horizontally to fit the wrap width on iframes narrower than 720px. fitMiniPreview then reads naturalW from the box's inline style (720) — not the post-flex-shrink computed width — and applies transform: scale(min(wrapW/720, wrapH/720)). The horizontal axis ends up scaled twice: once by flex (down to wrap width), then again by the transform. Result: horizontal squish equal to (wrapW / 720), visible especially on aspect-ratio:1/1 iframes hosting square pixel art. Switched both the public paint wrap and the locked-premium paint wrap to `display: grid; place-items: center`. Grid centers fixed- size children without shrinking them, so the box stays 720×720 in layout. fitMiniPreview's scale calc is then accurate and uniform.