mfarre HF staff legraphista commited on
Commit
4de9d00
1 Parent(s): 88962c6

CSS fixes (#3)

Browse files

- fix: css scroll issues (0491bca9df63efcb8dbefa1e1348c1b3a6b56bf4)
- fix: shrunk header on mobile when interacting (153cb7825b51a0bbbc976b1eb776a843c91b32a3)
- update: improved initial state (aaaca2f2bfaa1c7ea879fdf2a465627cf120ba56)


Co-authored-by: Stefan-Gabriel Muscalu <legraphista@users.noreply.huggingface.co>

Files changed (1) hide show
  1. app.py +59 -1
app.py CHANGED
@@ -349,6 +349,38 @@ def process_video(video_id: str):
349
  return None, "", f"Error processing video: {str(e)}"
350
 
351
  css = """
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
352
  body {
353
  margin: 0;
354
  padding: 0;
@@ -404,6 +436,7 @@ body {
404
 
405
  max-height: 80vh; /* Adjust as needed */
406
  overflow-y: auto;
 
407
  }
408
  #video-column {
409
  width: 70%;
@@ -435,7 +468,6 @@ body {
435
  height: 100% !important;
436
  }
437
  #scrollable-content {
438
- height: 67vh;
439
  overflow-y: auto;
440
  padding: 20px;
441
  }
@@ -539,6 +571,10 @@ body {
539
  #header {
540
  flex-direction: column;
541
  align-items: flex-start;
 
 
 
 
542
  }
543
  #header-content h1 {
544
  font-size: 24px;
@@ -549,13 +585,35 @@ body {
549
  #logo {
550
  align-self: flex-end;
551
  margin-top: 10px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
552
  }
553
  #top-panel {
554
  flex-direction: column;
 
 
 
 
555
  }
556
  #video-list-column, #video-column {
557
  width: 100%;
558
  }
 
 
 
559
  }
560
  .icon-buttons button {
561
  display: none !important;
 
349
  return None, "", f"Error processing video: {str(e)}"
350
 
351
  css = """
352
+ * {
353
+ margin: 0;
354
+ padding: 0;
355
+ box-sizing: border-box;
356
+ # flex: 0!important;
357
+ }
358
+ html, body, gradio-app {
359
+ height: 100%;
360
+ min-height: unset!important;
361
+ max-height: unset!important;
362
+ display: block!important;
363
+ }
364
+ .main {
365
+ flex-grow: 1;
366
+ flex-shrink: 1;
367
+ overflow: hidden;
368
+ }
369
+ .main .wrap .contain {
370
+ flex-grow: 1;
371
+ flex-shrink: 1;
372
+ overflow: hidden;
373
+ }
374
+ #component-0 {
375
+ overflow: hidden;
376
+ }
377
+ # .app {
378
+ # overflow: hidden;
379
+ # }
380
+ #top-panel {
381
+ flex-shrink: 0;
382
+ }
383
+
384
  body {
385
  margin: 0;
386
  padding: 0;
 
436
 
437
  max-height: 80vh; /* Adjust as needed */
438
  overflow-y: auto;
439
+ height: 100%;
440
  }
441
  #video-column {
442
  width: 70%;
 
468
  height: 100% !important;
469
  }
470
  #scrollable-content {
 
471
  overflow-y: auto;
472
  padding: 20px;
473
  }
 
571
  #header {
572
  flex-direction: column;
573
  align-items: flex-start;
574
+ flex-wrap: nowrap;
575
+ overflow: hidden;
576
+ max-height: 25vh;
577
+ flex-shrink: 0;
578
  }
579
  #header-content h1 {
580
  font-size: 24px;
 
585
  #logo {
586
  align-self: flex-end;
587
  margin-top: 10px;
588
+
589
+ position: absolute;
590
+ top: 12px;
591
+ right: -24px;
592
+ height: auto!important;
593
+ width: 150px;
594
+ min-width: 0!important;
595
+
596
+ margin:0!important;
597
+ }
598
+ #logo .image-container {
599
+ height: auto!important;
600
+ }
601
+ .image-frame {
602
+ height: auto!important;
603
  }
604
  #top-panel {
605
  flex-direction: column;
606
+ height: auto;
607
+ flex-shrink: 1;
608
+ flex-grow: 1;
609
+ min-height: 50vh;
610
  }
611
  #video-list-column, #video-column {
612
  width: 100%;
613
  }
614
+ #video-list-column {
615
+ flex-grow: 7!important;
616
+ }
617
  }
618
  .icon-buttons button {
619
  display: none !important;