Spaces:
Running on Zero
Running on Zero
fix: grow the demo with its content so the page can scroll
Browse filesGradio's viewport flex column was still shrinking the chat to fit, which kept Parameters and Showcase clipped.
app.py
CHANGED
|
@@ -188,8 +188,10 @@ html, body, #root, .gradio-container, .gradio-container > .main,
|
|
| 188 |
.gradio-container .wrap.default {
|
| 189 |
background: transparent !important;
|
| 190 |
}
|
| 191 |
-
/*
|
|
|
|
| 192 |
html, body {
|
|
|
|
| 193 |
height: auto !important;
|
| 194 |
min-height: 100% !important;
|
| 195 |
max-height: none !important;
|
|
@@ -200,6 +202,9 @@ html, body {
|
|
| 200 |
}
|
| 201 |
.gradio-container, .gradio-container > .main, .fillable,
|
| 202 |
.contain, .app {
|
|
|
|
|
|
|
|
|
|
| 203 |
height: auto !important;
|
| 204 |
min-height: 100vh !important;
|
| 205 |
max-height: none !important;
|
|
@@ -222,7 +227,7 @@ footer, .footer, .built-with, .settings, .settings-bar, .show-api,
|
|
| 222 |
}
|
| 223 |
|
| 224 |
#app-shell {
|
| 225 |
-
flex:
|
| 226 |
height: auto !important;
|
| 227 |
max-height: none !important;
|
| 228 |
min-height: 100vh !important;
|
|
@@ -242,8 +247,8 @@ footer, .footer, .built-with, .settings, .settings-bar, .show-api,
|
|
| 242 |
#app-shell > #twil-chat,
|
| 243 |
#app-shell > .block:has(#twil-chat),
|
| 244 |
#app-shell > div:has(#twil-chat) {
|
| 245 |
-
flex:
|
| 246 |
-
min-height:
|
| 247 |
height: auto !important;
|
| 248 |
}
|
| 249 |
|
|
@@ -335,13 +340,13 @@ footer, .footer, .built-with, .settings, .settings-bar, .show-api,
|
|
| 335 |
height: auto !important;
|
| 336 |
max-height: none !important;
|
| 337 |
margin: 0 auto !important;
|
| 338 |
-
flex:
|
| 339 |
display: flex !important;
|
| 340 |
flex-direction: column !important;
|
| 341 |
overflow: visible !important;
|
| 342 |
}
|
| 343 |
#twil-chat > .wrapper {
|
| 344 |
-
flex:
|
| 345 |
height: auto !important;
|
| 346 |
max-height: none !important;
|
| 347 |
min-height: 0 !important;
|
|
@@ -350,17 +355,12 @@ footer, .footer, .built-with, .settings, .settings-bar, .show-api,
|
|
| 350 |
overflow: visible !important;
|
| 351 |
}
|
| 352 |
#twil-chat .bubble-wrap {
|
| 353 |
-
flex:
|
| 354 |
height: auto !important;
|
| 355 |
-
min-height:
|
| 356 |
-
|
| 357 |
-
to reach the composer, parameters, and disclaimer below it. */
|
| 358 |
-
max-height: calc(100vh - 340px) !important;
|
| 359 |
overflow-x: hidden !important;
|
| 360 |
-
overflow-y:
|
| 361 |
-
overscroll-behavior: contain;
|
| 362 |
-
scrollbar-gutter: stable;
|
| 363 |
-
scroll-behavior: smooth;
|
| 364 |
padding-right: 8px !important;
|
| 365 |
}
|
| 366 |
#twil-chat .bubble-wrap::-webkit-scrollbar {
|
|
@@ -561,8 +561,8 @@ footer, .footer, .built-with, .settings, .settings-bar, .show-api,
|
|
| 561 |
|
| 562 |
/* Tabs grow with their content so the document can scroll. */
|
| 563 |
#twil-tabs {
|
| 564 |
-
flex:
|
| 565 |
-
min-height:
|
| 566 |
height: auto !important;
|
| 567 |
max-height: none !important;
|
| 568 |
display: flex !important;
|
|
@@ -598,7 +598,7 @@ footer, .footer, .built-with, .settings, .settings-bar, .show-api,
|
|
| 598 |
border-bottom-color: var(--weba-fg) !important;
|
| 599 |
}
|
| 600 |
#twil-tabs .tabitem {
|
| 601 |
-
flex:
|
| 602 |
min-height: auto !important;
|
| 603 |
height: auto !important;
|
| 604 |
max-height: none !important;
|
|
@@ -621,9 +621,10 @@ footer, .footer, .built-with, .settings, .settings-bar, .show-api,
|
|
| 621 |
}
|
| 622 |
#tab-chat .block:has(#twil-chat),
|
| 623 |
#tab-chat div:has(> #twil-chat) {
|
| 624 |
-
flex:
|
| 625 |
-
min-height:
|
| 626 |
height: auto !important;
|
|
|
|
| 627 |
}
|
| 628 |
#tab-showcase {
|
| 629 |
overflow: visible !important;
|
|
|
|
| 188 |
.gradio-container .wrap.default {
|
| 189 |
background: transparent !important;
|
| 190 |
}
|
| 191 |
+
/* Gradio's root is a flex column locked to the viewport. Make it a normal
|
| 192 |
+
document so content taller than the window extends the page and scrolls. */
|
| 193 |
html, body {
|
| 194 |
+
display: block !important;
|
| 195 |
height: auto !important;
|
| 196 |
min-height: 100% !important;
|
| 197 |
max-height: none !important;
|
|
|
|
| 202 |
}
|
| 203 |
.gradio-container, .gradio-container > .main, .fillable,
|
| 204 |
.contain, .app {
|
| 205 |
+
display: flex !important;
|
| 206 |
+
flex-direction: column !important;
|
| 207 |
+
flex-grow: 0 !important;
|
| 208 |
height: auto !important;
|
| 209 |
min-height: 100vh !important;
|
| 210 |
max-height: none !important;
|
|
|
|
| 227 |
}
|
| 228 |
|
| 229 |
#app-shell {
|
| 230 |
+
flex: 0 0 auto !important;
|
| 231 |
height: auto !important;
|
| 232 |
max-height: none !important;
|
| 233 |
min-height: 100vh !important;
|
|
|
|
| 247 |
#app-shell > #twil-chat,
|
| 248 |
#app-shell > .block:has(#twil-chat),
|
| 249 |
#app-shell > div:has(#twil-chat) {
|
| 250 |
+
flex: 0 0 auto !important;
|
| 251 |
+
min-height: auto !important;
|
| 252 |
height: auto !important;
|
| 253 |
}
|
| 254 |
|
|
|
|
| 340 |
height: auto !important;
|
| 341 |
max-height: none !important;
|
| 342 |
margin: 0 auto !important;
|
| 343 |
+
flex: 0 0 auto !important;
|
| 344 |
display: flex !important;
|
| 345 |
flex-direction: column !important;
|
| 346 |
overflow: visible !important;
|
| 347 |
}
|
| 348 |
#twil-chat > .wrapper {
|
| 349 |
+
flex: 0 0 auto !important;
|
| 350 |
height: auto !important;
|
| 351 |
max-height: none !important;
|
| 352 |
min-height: 0 !important;
|
|
|
|
| 355 |
overflow: visible !important;
|
| 356 |
}
|
| 357 |
#twil-chat .bubble-wrap {
|
| 358 |
+
flex: 0 0 auto !important;
|
| 359 |
height: auto !important;
|
| 360 |
+
min-height: 280px !important;
|
| 361 |
+
max-height: none !important;
|
|
|
|
|
|
|
| 362 |
overflow-x: hidden !important;
|
| 363 |
+
overflow-y: visible !important;
|
|
|
|
|
|
|
|
|
|
| 364 |
padding-right: 8px !important;
|
| 365 |
}
|
| 366 |
#twil-chat .bubble-wrap::-webkit-scrollbar {
|
|
|
|
| 561 |
|
| 562 |
/* Tabs grow with their content so the document can scroll. */
|
| 563 |
#twil-tabs {
|
| 564 |
+
flex: 0 0 auto !important;
|
| 565 |
+
min-height: auto !important;
|
| 566 |
height: auto !important;
|
| 567 |
max-height: none !important;
|
| 568 |
display: flex !important;
|
|
|
|
| 598 |
border-bottom-color: var(--weba-fg) !important;
|
| 599 |
}
|
| 600 |
#twil-tabs .tabitem {
|
| 601 |
+
flex: 0 0 auto !important;
|
| 602 |
min-height: auto !important;
|
| 603 |
height: auto !important;
|
| 604 |
max-height: none !important;
|
|
|
|
| 621 |
}
|
| 622 |
#tab-chat .block:has(#twil-chat),
|
| 623 |
#tab-chat div:has(> #twil-chat) {
|
| 624 |
+
flex: 0 0 auto !important;
|
| 625 |
+
min-height: auto !important;
|
| 626 |
height: auto !important;
|
| 627 |
+
overflow: visible !important;
|
| 628 |
}
|
| 629 |
#tab-showcase {
|
| 630 |
overflow: visible !important;
|