Spaces:
Runtime error
Runtime error
Update style.css
Browse files
style.css
CHANGED
|
@@ -288,3 +288,123 @@ input[type="range"]{ accent-color: var(--accent); }
|
|
| 288 |
|
| 289 |
/* Optional: hide Gradio footer */
|
| 290 |
footer{ display:none !important; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 288 |
|
| 289 |
/* Optional: hide Gradio footer */
|
| 290 |
footer{ display:none !important; }
|
| 291 |
+
|
| 292 |
+
|
| 293 |
+
|
| 294 |
+
/* ============================================================
|
| 295 |
+
FIX PACK — Gallery Carousel + Button Width (Gradio 4.44.x)
|
| 296 |
+
REQUIRES: elem_id="down_gallery" and elem_id="strange_gallery"
|
| 297 |
+
============================================================ */
|
| 298 |
+
|
| 299 |
+
/* ----------------------------
|
| 300 |
+
1) Buttons: stop banner mode
|
| 301 |
+
---------------------------- */
|
| 302 |
+
|
| 303 |
+
/* Gradio often forces buttons to 100% width via wrapper rules */
|
| 304 |
+
.gradio-container :is(button, .gr-button){
|
| 305 |
+
width: fit-content !important;
|
| 306 |
+
min-width: 180px !important;
|
| 307 |
+
max-width: 320px !important;
|
| 308 |
+
|
| 309 |
+
display: inline-flex !important;
|
| 310 |
+
align-items: center !important;
|
| 311 |
+
justify-content: center !important;
|
| 312 |
+
|
| 313 |
+
flex: 0 0 auto !important;
|
| 314 |
+
}
|
| 315 |
+
|
| 316 |
+
/* If the parent is a flex/column that stretches, align to start */
|
| 317 |
+
.gradio-container :is(.gr-panel, .block, .wrap, .container, .gr-form) :is(button, .gr-button){
|
| 318 |
+
align-self: flex-start !important;
|
| 319 |
+
}
|
| 320 |
+
|
| 321 |
+
/* Some Gradio themes wrap buttons inside a full-width container */
|
| 322 |
+
.gradio-container :is(button, .gr-button){
|
| 323 |
+
white-space: nowrap !important;
|
| 324 |
+
}
|
| 325 |
+
|
| 326 |
+
|
| 327 |
+
/* ----------------------------
|
| 328 |
+
2) Gallery: kill “round giant”
|
| 329 |
+
---------------------------- */
|
| 330 |
+
|
| 331 |
+
/* Neutralize mask/clip and ensure thumbnails, not posters */
|
| 332 |
+
#down_gallery img,
|
| 333 |
+
#strange_gallery img{
|
| 334 |
+
border-radius: 12px !important;
|
| 335 |
+
clip-path: none !important;
|
| 336 |
+
mask-image: none !important;
|
| 337 |
+
|
| 338 |
+
width: 100% !important;
|
| 339 |
+
height: 140px !important;
|
| 340 |
+
object-fit: contain !important;
|
| 341 |
+
|
| 342 |
+
background: rgba(255,255,255,.02) !important;
|
| 343 |
+
}
|
| 344 |
+
|
| 345 |
+
/* Sometimes the radius is on wrapper elements, not the <img> */
|
| 346 |
+
#down_gallery :is(figure, li, .gallery-item, .thumbnail-item, .item, .card),
|
| 347 |
+
#strange_gallery :is(figure, li, .gallery-item, .thumbnail-item, .item, .card){
|
| 348 |
+
border-radius: 14px !important;
|
| 349 |
+
overflow: hidden !important;
|
| 350 |
+
background: rgba(255,255,255,.03) !important;
|
| 351 |
+
border: 1px solid rgba(255,255,255,.10) !important;
|
| 352 |
+
padding: 8px !important;
|
| 353 |
+
}
|
| 354 |
+
|
| 355 |
+
/* Hide captions/filename vibe */
|
| 356 |
+
#down_gallery :is(figcaption, .caption, .filename),
|
| 357 |
+
#strange_gallery :is(figcaption, .caption, .filename){
|
| 358 |
+
display:none !important;
|
| 359 |
+
}
|
| 360 |
+
|
| 361 |
+
|
| 362 |
+
/* ----------------------------
|
| 363 |
+
3) Gallery: force carousel
|
| 364 |
+
---------------------------- */
|
| 365 |
+
|
| 366 |
+
/* Ensure the internal container can scroll horizontally */
|
| 367 |
+
#down_gallery,
|
| 368 |
+
#strange_gallery{
|
| 369 |
+
width: 100% !important;
|
| 370 |
+
}
|
| 371 |
+
|
| 372 |
+
/* The direct child often holds the grid/list */
|
| 373 |
+
#down_gallery > div,
|
| 374 |
+
#strange_gallery > div{
|
| 375 |
+
overflow-x: auto !important;
|
| 376 |
+
overflow-y: hidden !important;
|
| 377 |
+
-webkit-overflow-scrolling: touch;
|
| 378 |
+
}
|
| 379 |
+
|
| 380 |
+
/* Cover multiple possible DOM structures across Gradio builds */
|
| 381 |
+
#down_gallery :is(.grid, .wrap, .gallery, .container, ul, .items, .thumbnails),
|
| 382 |
+
#strange_gallery :is(.grid, .wrap, .gallery, .container, ul, .items, .thumbnails){
|
| 383 |
+
display: flex !important;
|
| 384 |
+
flex-wrap: nowrap !important;
|
| 385 |
+
gap: 14px !important;
|
| 386 |
+
align-items: stretch !important;
|
| 387 |
+
|
| 388 |
+
padding: 12px !important;
|
| 389 |
+
|
| 390 |
+
scroll-snap-type: x mandatory;
|
| 391 |
+
}
|
| 392 |
+
|
| 393 |
+
/* Each slide width */
|
| 394 |
+
#down_gallery :is(figure, li, .gallery-item, .thumbnail-item, .item, .card),
|
| 395 |
+
#strange_gallery :is(figure, li, .gallery-item, .thumbnail-item, .item, .card){
|
| 396 |
+
flex: 0 0 auto !important;
|
| 397 |
+
width: 240px !important;
|
| 398 |
+
scroll-snap-align: start;
|
| 399 |
+
}
|
| 400 |
+
|
| 401 |
+
/* Sleek scrollbar */
|
| 402 |
+
#down_gallery *::-webkit-scrollbar,
|
| 403 |
+
#strange_gallery *::-webkit-scrollbar{
|
| 404 |
+
height: 6px;
|
| 405 |
+
}
|
| 406 |
+
#down_gallery *::-webkit-scrollbar-thumb,
|
| 407 |
+
#strange_gallery *::-webkit-scrollbar-thumb{
|
| 408 |
+
background: rgba(255,255,255,.14);
|
| 409 |
+
border-radius: 999px;
|
| 410 |
+
}
|