mirror of
https://github.com/gradio-app/gradio.git
synced 2025-01-24 10:54:04 +08:00
Remove the styles from the Image/Video primitive components and Fix the container styles (#6726)
* Remove the styles from the Image/Video primitive components and Fix the container styles * add changeset * Fix image example size styles * Remove border from image/Example with type=gallery --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
This commit is contained in:
parent
a1b966edf7
commit
21cfb0acc3
7
.changeset/legal-geese-agree.md
Normal file
7
.changeset/legal-geese-agree.md
Normal file
@ -0,0 +1,7 @@
|
||||
---
|
||||
"@gradio/image": minor
|
||||
"@gradio/video": minor
|
||||
"gradio": minor
|
||||
---
|
||||
|
||||
feat:Remove the styles from the Image/Video primitive components and Fix the container styles
|
@ -17,6 +17,11 @@
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.container :global(img) {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.container.selected {
|
||||
border-color: var(--border-color-accent);
|
||||
}
|
||||
@ -25,13 +30,13 @@
|
||||
margin: 0 auto;
|
||||
border: 2px solid var(--border-color-primary);
|
||||
border-radius: var(--radius-lg);
|
||||
overflow: hidden;
|
||||
width: var(--size-20);
|
||||
height: var(--size-20);
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.container.gallery {
|
||||
border: 2px solid var(--border-color-primary);
|
||||
height: var(--size-20);
|
||||
max-height: var(--size-20);
|
||||
object-fit: cover;
|
||||
|
@ -13,11 +13,3 @@
|
||||
{:catch error}
|
||||
<p style="color: red;">{error.message}</p>
|
||||
{/await}
|
||||
|
||||
<style>
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: var(--radius-lg);
|
||||
}
|
||||
</style>
|
||||
|
@ -43,10 +43,13 @@
|
||||
<style>
|
||||
.container {
|
||||
flex: none;
|
||||
border: 2px solid var(--border-color-primary);
|
||||
border-radius: var(--radius-lg);
|
||||
max-width: none;
|
||||
}
|
||||
.container :global(video) {
|
||||
width: var(--size-full);
|
||||
height: var(--size-full);
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.container:hover,
|
||||
.container.selected {
|
||||
@ -54,6 +57,9 @@
|
||||
}
|
||||
.container.table {
|
||||
margin: 0 auto;
|
||||
border: 2px solid var(--border-color-primary);
|
||||
border-radius: var(--radius-lg);
|
||||
overflow: hidden;
|
||||
width: var(--size-20);
|
||||
height: var(--size-20);
|
||||
object-fit: cover;
|
||||
|
@ -254,4 +254,8 @@
|
||||
width: var(--size-full);
|
||||
border-radius: var(--radius-xl);
|
||||
}
|
||||
.wrap :global(video) {
|
||||
height: var(--size-full);
|
||||
width: var(--size-full);
|
||||
}
|
||||
</style>
|
||||
|
@ -121,13 +121,4 @@
|
||||
background: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
video {
|
||||
position: inherit;
|
||||
background-color: black;
|
||||
width: var(--size-full);
|
||||
height: var(--size-full);
|
||||
object-fit: contain;
|
||||
border-radius: var(--radius-xl);
|
||||
}
|
||||
</style>
|
||||
|
Loading…
Reference in New Issue
Block a user