IncreasingLoss commited on
Commit
d4e4131
·
verified ·
1 Parent(s): 17f0006

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +51 -14
app.py CHANGED
@@ -463,28 +463,65 @@ css = """
463
  margin: 0 auto !important;
464
  justify-content: center !important;
465
  gap: 8px !important;
466
- min-height: 150px !important; /* Added minimum height */
467
  }
468
  .centered-examples .thumb {
469
  height: 100px !important;
470
  width: 100px !important;
471
  object-fit: cover !important;
472
- margin: 5px !important; /* Added margin between thumbs */
473
  }
474
- /* 1) Global override: remove any forced sizing on .fixed-height anywhere */
475
- .fixed-height.svelte-842rpi.svelte-842rpi {
476
- min-height: 0 !important; /* cancel the global min-height */
477
- max-height: none !important; /* cancel the global max-height */
478
- height: auto !important; /* allow auto height */
 
 
 
 
 
 
 
 
 
 
479
  }
480
- /* 2) Same-query override: mirror Gradio’s media query exactly */
 
 
 
 
 
 
 
 
 
481
  @media (min-width: 1280px) {
482
- /* target the exact same class chain inside the breakpoint */
483
- .fixed-height.svelte-842rpi.svelte-842rpi {
484
- min-height: 0 !important; /* zero-out the 55vh/min-height there */
485
- max-height: none !important; /* remove the viewport-height cap */
486
- height: auto !important; /* let content dictate height */
487
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
488
  }
489
  """
490
 
 
463
  margin: 0 auto !important;
464
  justify-content: center !important;
465
  gap: 8px !important;
466
+ min-height: 150px !important;
467
  }
468
  .centered-examples .thumb {
469
  height: 100px !important;
470
  width: 100px !important;
471
  object-fit: cover !important;
472
+ margin: 5px !important;
473
  }
474
+
475
+ /* Universal solution - targets any element with both fixed-height and svelte classes */
476
+ [class*="fixed-height"][class*="svelte-"] {
477
+ min-height: 0 !important;
478
+ max-height: 200px !important;
479
+ height: auto !important;
480
+ overflow-y: auto !important;
481
+ }
482
+
483
+ /* More specific for grid-wrap containers */
484
+ [class*="grid-wrap"][class*="svelte-"][class*="fixed-height"] {
485
+ min-height: 0 !important;
486
+ max-height: 200px !important;
487
+ height: auto !important;
488
+ overflow-y: auto !important;
489
  }
490
+
491
+ /* Target gallery containers specifically */
492
+ #my_media_gallery [class*="grid-wrap"] {
493
+ min-height: 0 !important;
494
+ max-height: 200px !important;
495
+ height: auto !important;
496
+ overflow-y: auto !important;
497
+ }
498
+
499
+ /* Media query version */
500
  @media (min-width: 1280px) {
501
+ [class*="fixed-height"][class*="svelte-"] {
502
+ min-height: 0 !important;
503
+ max-height: 200px !important;
504
+ height: auto !important;
505
+ }
506
+
507
+ [class*="grid-wrap"][class*="svelte-"][class*="fixed-height"] {
508
+ min-height: 0 !important;
509
+ max-height: 200px !important;
510
+ height: auto !important;
511
+ }
512
+ }
513
+
514
+ /* Fallback with even higher specificity */
515
+ div[class*="fixed-height"][class*="svelte-"]:not([style*="min-height"]) {
516
+ min-height: 0 !important;
517
+ }
518
+
519
+ /* Target the specific gallery by ID */
520
+ #my_media_gallery div[class*="grid-wrap"] {
521
+ min-height: 0 !important;
522
+ max-height: 200px !important;
523
+ height: auto !important;
524
+ overflow-y: auto !important;
525
  }
526
  """
527