diff --git a/.changeset/shy-signs-taste.md b/.changeset/shy-signs-taste.md new file mode 100644 index 0000000000..6358145bbd --- /dev/null +++ b/.changeset/shy-signs-taste.md @@ -0,0 +1,6 @@ +--- +"@gradio/atoms": patch +"gradio": patch +--- + +fix:Ensure non-form elements are correctly positioned when scale is applied diff --git a/js/atoms/src/Block.svelte b/js/atoms/src/Block.svelte index d77331241f..2190d033db 100644 --- a/js/atoms/src/Block.svelte +++ b/js/atoms/src/Block.svelte @@ -59,6 +59,7 @@ style:flex-grow={scale} style:min-width={`calc(min(${min_width}px, 100%))`} style:border-width="var(--block-border-width)" + class:auto-margin={scale === null} > @@ -74,6 +75,9 @@ background: var(--block-background-fill); width: 100%; line-height: var(--line-sm); + } + + .auto-margin { margin-left: auto; margin-right: auto; }