From 97f0e0dcc950f8f28f5751f03fbf0c4f1e35d2c5 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 22 Oct 2026 13:21:22 +0000 Subject: [PATCH] ui kit: preview picture scales to fit its stage A clip or picture smaller than the preview used to stay at its own size inside black. It now fills the stage and object-fit: contain scales it up; only a differing aspect ratio leaves bars. Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_01E6LjCrZ8KMcHGZyRWjkPA5 --- app/ui/composer/elements/gallery.css | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/ui/composer/elements/gallery.css b/app/ui/composer/elements/gallery.css index 6b27953c..7b424ab6 100644 --- a/app/ui/composer/elements/gallery.css +++ b/app/ui/composer/elements/gallery.css @@ -121,9 +121,11 @@ min-block-size: 0; min-inline-size: 0; background: var(--void); } +/* Fills the stage and lets object-fit do the fitting: with `auto` sizes and only a + max, a picture smaller than the stage stayed at its own size inside a field of + black instead of scaling up to it. */ .cx-viewer-media { - max-inline-size: 100%; max-block-size: 100%; - inline-size: auto; block-size: auto; + inline-size: 100%; block-size: 100%; object-fit: contain; }