mirror of
https://github.com/gradio-app/gradio.git
synced 2024-11-27 01:40:20 +08:00
Ensure non-form elements are correctly positioned when scale is applied (#9882)
* apply margin when scale is null * remove console.log * add changeset --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
This commit is contained in:
parent
a1582a6dca
commit
6c8a064fee
6
.changeset/shy-signs-taste.md
Normal file
6
.changeset/shy-signs-taste.md
Normal file
@ -0,0 +1,6 @@
|
||||
---
|
||||
"@gradio/atoms": patch
|
||||
"gradio": patch
|
||||
---
|
||||
|
||||
fix:Ensure non-form elements are correctly positioned when scale is applied
|
@ -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}
|
||||
>
|
||||
<slot />
|
||||
</svelte:element>
|
||||
@ -74,6 +75,9 @@
|
||||
background: var(--block-background-fill);
|
||||
width: 100%;
|
||||
line-height: var(--line-sm);
|
||||
}
|
||||
|
||||
.auto-margin {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user