Spaces:
Sleeping
Sleeping
Fix modal blur layering using body:has() selector
Browse files
app.py
CHANGED
|
@@ -714,8 +714,12 @@ with gr.Blocks(title="AnatomyBot - MBBS Anatomy Tutor") as demo:
|
|
| 714 |
# Add custom CSS styling via HTML
|
| 715 |
gr.HTML("""
|
| 716 |
<style>
|
| 717 |
-
/* Modal backdrop */
|
| 718 |
-
#registration_modal
|
|
|
|
|
|
|
|
|
|
|
|
|
| 719 |
content: '';
|
| 720 |
position: fixed;
|
| 721 |
top: 0;
|
|
@@ -723,8 +727,10 @@ with gr.Blocks(title="AnatomyBot - MBBS Anatomy Tutor") as demo:
|
|
| 723 |
right: 0;
|
| 724 |
bottom: 0;
|
| 725 |
background: rgba(0, 0, 0, 0.6);
|
| 726 |
-
|
| 727 |
-
|
|
|
|
|
|
|
| 728 |
}
|
| 729 |
|
| 730 |
/* Modal container */
|
|
|
|
| 714 |
# Add custom CSS styling via HTML
|
| 715 |
gr.HTML("""
|
| 716 |
<style>
|
| 717 |
+
/* Modal backdrop using body::after when modal exists */
|
| 718 |
+
body:has(#registration_modal) #registration_modal {
|
| 719 |
+
display: block !important;
|
| 720 |
+
}
|
| 721 |
+
|
| 722 |
+
body:has(#registration_modal)::after {
|
| 723 |
content: '';
|
| 724 |
position: fixed;
|
| 725 |
top: 0;
|
|
|
|
| 727 |
right: 0;
|
| 728 |
bottom: 0;
|
| 729 |
background: rgba(0, 0, 0, 0.6);
|
| 730 |
+
backdrop-filter: blur(8px);
|
| 731 |
+
-webkit-backdrop-filter: blur(8px);
|
| 732 |
+
z-index: 999;
|
| 733 |
+
pointer-events: all;
|
| 734 |
}
|
| 735 |
|
| 736 |
/* Modal container */
|