mirror of
https://github.com/pbakaus/impeccable.git
synced 2026-09-12 06:06:37 +03:00
Screenshotting a transparent container rendered black because we were no longer passing `backgroundColor` to modern-screenshot at all (to avoid its `background-color !important` override on elements with their own bg, like the teal card). That fix left elements without their own bg rendering on a transparent canvas, which reads as black wherever the PNG is previewed. Now we resolve per-element: if the element has an opaque background-color or a background-image, omit the option (element's own bg renders, no override). If it's transparent, walk up ancestors to the first opaque background (falling back to body/html) and pass that as the canvas fill. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>