Spaces:
Sleeping
Sleeping
Fix iframe resizer infinite scroll issue
Browse files- Remove min-height: 100vh that caused iframe to grow infinitely
- Use height: 100% with min-height: 500px for fixed sizing
- Set overflow: hidden on containers
- Add max-height: 100% to prevent expansion
app.py
CHANGED
|
@@ -53,15 +53,17 @@ MATH_CSS = """
|
|
| 53 |
html, body {
|
| 54 |
height: 100%;
|
| 55 |
width: 100%;
|
| 56 |
-
overflow:
|
| 57 |
font-family: system-ui, -apple-system, sans-serif;
|
|
|
|
| 58 |
}
|
| 59 |
#math-app {
|
| 60 |
display: flex;
|
| 61 |
flex-direction: column;
|
| 62 |
align-items: center;
|
| 63 |
justify-content: center;
|
| 64 |
-
|
|
|
|
| 65 |
background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
|
| 66 |
color: #fff;
|
| 67 |
padding: 2rem;
|
|
@@ -180,10 +182,13 @@ footer { display: none !important; }
|
|
| 180 |
width: 100% !important;
|
| 181 |
padding: 0 !important;
|
| 182 |
margin: 0 !important;
|
|
|
|
|
|
|
| 183 |
}
|
| 184 |
main.fillable, main[class*="fillable"], .app {
|
| 185 |
padding: 0 !important;
|
| 186 |
margin: 0 !important;
|
|
|
|
| 187 |
}
|
| 188 |
.block, .block.padded {
|
| 189 |
padding: 0 !important;
|
|
@@ -194,12 +199,18 @@ html, body, #root, .gradio-container, .contain, gradio-app {
|
|
| 194 |
height: 100% !important;
|
| 195 |
margin: 0 !important;
|
| 196 |
padding: 0 !important;
|
| 197 |
-
overflow:
|
|
|
|
| 198 |
}
|
| 199 |
[class*="svelte"] {
|
| 200 |
padding: 0 !important;
|
| 201 |
margin: 0 !important;
|
| 202 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 203 |
</style>
|
| 204 |
"""
|
| 205 |
|
|
|
|
| 53 |
html, body {
|
| 54 |
height: 100%;
|
| 55 |
width: 100%;
|
| 56 |
+
overflow: hidden;
|
| 57 |
font-family: system-ui, -apple-system, sans-serif;
|
| 58 |
+
background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
|
| 59 |
}
|
| 60 |
#math-app {
|
| 61 |
display: flex;
|
| 62 |
flex-direction: column;
|
| 63 |
align-items: center;
|
| 64 |
justify-content: center;
|
| 65 |
+
height: 100%;
|
| 66 |
+
min-height: 500px;
|
| 67 |
background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
|
| 68 |
color: #fff;
|
| 69 |
padding: 2rem;
|
|
|
|
| 182 |
width: 100% !important;
|
| 183 |
padding: 0 !important;
|
| 184 |
margin: 0 !important;
|
| 185 |
+
min-height: 0 !important;
|
| 186 |
+
height: 100% !important;
|
| 187 |
}
|
| 188 |
main.fillable, main[class*="fillable"], .app {
|
| 189 |
padding: 0 !important;
|
| 190 |
margin: 0 !important;
|
| 191 |
+
min-height: 0 !important;
|
| 192 |
}
|
| 193 |
.block, .block.padded {
|
| 194 |
padding: 0 !important;
|
|
|
|
| 199 |
height: 100% !important;
|
| 200 |
margin: 0 !important;
|
| 201 |
padding: 0 !important;
|
| 202 |
+
overflow: hidden !important;
|
| 203 |
+
min-height: 0 !important;
|
| 204 |
}
|
| 205 |
[class*="svelte"] {
|
| 206 |
padding: 0 !important;
|
| 207 |
margin: 0 !important;
|
| 208 |
}
|
| 209 |
+
/* Prevent iframe resizer infinite loop */
|
| 210 |
+
.contain, .main, gradio-app {
|
| 211 |
+
min-height: 0 !important;
|
| 212 |
+
max-height: 100% !important;
|
| 213 |
+
}
|
| 214 |
</style>
|
| 215 |
"""
|
| 216 |
|