Skip to content

Commit

Permalink
Fix Gallery preview overlay and backdrop (#7505)
Browse files Browse the repository at this point in the history
* Restore `Gallery` translucent background

* Add `backdrop-filter` for Safari

* Fix overflowing `Gallery` preview overlay

* add changeset

* Older browser support

* add changeset

---------

Co-authored-by: Abubakar Abid <[email protected]>
Co-authored-by: gradio-pr-bot <[email protected]>
Co-authored-by: Dawood Khan <[email protected]>
  • Loading branch information
4 people authored Feb 22, 2024
1 parent 9c36572 commit b186767
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 4 deletions.
7 changes: 7 additions & 0 deletions .changeset/young-emus-find.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@gradio/app": patch
"@gradio/gallery": patch
"gradio": patch
---

fix:Fix `Gallery` preview overlay and backdrop
1 change: 1 addition & 0 deletions js/app/src/Blocks.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -867,6 +867,7 @@
.backdrop {
flex: 1 1 0%;
-webkit-backdrop-filter: blur(4px);
backdrop-filter: blur(4px);
}
Expand Down
16 changes: 12 additions & 4 deletions js/gallery/shared/Gallery.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -338,14 +338,22 @@
.preview {
display: flex;
position: absolute;
top: 0px;
right: 0px;
bottom: 0px;
left: 0px;
flex-direction: column;
z-index: var(--layer-2);
border-radius: calc(var(--block-radius) - var(--block-border-width));
-webkit-backdrop-filter: blur(8px);
backdrop-filter: blur(8px);
width: var(--size-full);
height: var(--size-full);
}
.preview::before {
content: "";
position: absolute;
z-index: var(--layer-below);
background: var(--background-fill-primary);
opacity: 0.9;
width: var(--size-full);
height: var(--size-full);
}
Expand Down

0 comments on commit b186767

Please sign in to comment.