Spaces:
Running
on
Zero
Running
on
Zero
fix infinite page expansion on mobile
Browse filesReplace calc(100vh - X) with fixed pixel heights to avoid
iframe expansion loop in HuggingFace Spaces context.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
app.py
CHANGED
|
@@ -736,21 +736,20 @@ CUSTOM_CSS = """
|
|
| 736 |
button.primary { font-weight: 600; }
|
| 737 |
.gradio-accordion { margin-bottom: 12px; }
|
| 738 |
|
| 739 |
-
/* Mobile optimizations */
|
| 740 |
@media (max-width: 768px) {
|
| 741 |
-
/*
|
| 742 |
#chat-window, .chatbot {
|
| 743 |
-
height:
|
| 744 |
-
min-height:
|
| 745 |
-
max-height:
|
| 746 |
}
|
| 747 |
|
| 748 |
-
/*
|
| 749 |
#tts-audio {
|
| 750 |
margin: 4px 0 !important;
|
| 751 |
}
|
| 752 |
|
| 753 |
-
/* Compact the audio player on mobile */
|
| 754 |
#tts-audio audio {
|
| 755 |
height: 40px !important;
|
| 756 |
}
|
|
@@ -796,8 +795,8 @@ CUSTOM_CSS = """
|
|
| 796 |
/* Extra small screens (phones in portrait) */
|
| 797 |
@media (max-width: 480px) {
|
| 798 |
#chat-window, .chatbot {
|
| 799 |
-
height:
|
| 800 |
-
max-height:
|
| 801 |
}
|
| 802 |
|
| 803 |
#input-row {
|
|
|
|
| 736 |
button.primary { font-weight: 600; }
|
| 737 |
.gradio-accordion { margin-bottom: 12px; }
|
| 738 |
|
| 739 |
+
/* Mobile optimizations - use fixed heights to avoid iframe expansion issues */
|
| 740 |
@media (max-width: 768px) {
|
| 741 |
+
/* Use fixed height for chatbot on mobile (avoids 100vh iframe issues) */
|
| 742 |
#chat-window, .chatbot {
|
| 743 |
+
height: 350px !important;
|
| 744 |
+
min-height: 250px !important;
|
| 745 |
+
max-height: 350px !important;
|
| 746 |
}
|
| 747 |
|
| 748 |
+
/* Compact the TTS audio on mobile */
|
| 749 |
#tts-audio {
|
| 750 |
margin: 4px 0 !important;
|
| 751 |
}
|
| 752 |
|
|
|
|
| 753 |
#tts-audio audio {
|
| 754 |
height: 40px !important;
|
| 755 |
}
|
|
|
|
| 795 |
/* Extra small screens (phones in portrait) */
|
| 796 |
@media (max-width: 480px) {
|
| 797 |
#chat-window, .chatbot {
|
| 798 |
+
height: 280px !important;
|
| 799 |
+
max-height: 280px !important;
|
| 800 |
}
|
| 801 |
|
| 802 |
#input-row {
|