diff --git a/lib/folk-blender.ts b/lib/folk-blender.ts index b62927b..08766e3 100644 --- a/lib/folk-blender.ts +++ b/lib/folk-blender.ts @@ -49,10 +49,18 @@ const styles = css` background: rgba(255, 255, 255, 0.2); } + .wrapper { + height: 100%; + overflow: hidden; + display: flex; + flex-direction: column; + } + .content { display: flex; flex-direction: column; - height: calc(100% - 36px); + flex: 1; + min-height: 0; overflow: hidden; } @@ -136,6 +144,7 @@ const styles = css` .preview-area { flex: 1; + min-height: 0; overflow: hidden; display: flex; flex-direction: column; @@ -148,11 +157,13 @@ const styles = css` justify-content: center; padding: 12px; overflow: hidden; + min-height: 0; } .render-preview img { max-width: 100%; max-height: 100%; + object-fit: contain; border-radius: 8px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); } @@ -284,6 +295,7 @@ export class FolkBlender extends FolkShape { const root = super.createRenderRoot(); const wrapper = document.createElement("div"); + wrapper.className = "wrapper"; wrapper.innerHTML = html`