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 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01E6LjCrZ8KMcHGZyRWjkPA5
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user