QIDNLF commited on
Commit
ce119e6
ยท
verified ยท
1 Parent(s): 314d1bf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +25 -8
app.py CHANGED
@@ -501,17 +501,32 @@ with gr.Blocks() as demo:
501
  # 5. Application Styling (CSS)
502
  # ==========================================
503
  css = """
 
 
 
 
504
  table {
505
- table-layout: fixed !important;
506
- width: 100% !important;
 
507
  }
508
 
509
- /* 7์—ด ์ด์ƒ์˜ ๋‹ค์ค‘ ์—ด์— ๋Œ€ํ•œ ๊ธฐ๋ณธ Fallback (๊ฐ€๋กœ ์Šคํฌ๋กค ํ—ˆ์šฉ) */
510
  th, td {
511
- min-width: 150px;
 
 
 
 
 
 
 
 
 
 
 
 
512
  }
513
 
514
- /* [ํ•ด๊ฒฐ 2] ์ž‘์„ฑํ•˜์…จ๋˜ ๊ธฐ์กด 2~6 ์ปฌ๋Ÿผ ๋น„์œจ ์™„์ „ ๋ณต๊ตฌ (min-width ๋ฌด์‹œ ์„ค์ • ์ถ”๊ฐ€) */
515
  /* 2์ปฌ๋Ÿผ */
516
  table th:nth-last-child(2):first-child, table td:nth-last-child(2):first-child { width: 15% !important; min-width: 0 !important; }
517
  table th:nth-last-child(1), table td:nth-last-child(1) { width: 85% !important; min-width: 0 !important; }
@@ -537,7 +552,9 @@ table th:nth-child(4):nth-last-child(3), table td:nth-child(4):nth-last-child(3)
537
  table th:nth-child(5):nth-last-child(2), table td:nth-child(5):nth-last-child(2) { width: 8% !important; min-width: 0 !important; }
538
  table th:nth-child(6):nth-last-child(1), table td:nth-child(6):nth-last-child(1) { width: 26% !important; min-width: 0 !important; }
539
 
540
- /* ๊ธฐ๋ณธ ํ…Œ์ด๋ธ” & ์Šคํฌ๋กค ์„ค์ • */
 
 
541
  thead th {
542
  font-size: 18px !important;
543
  position: sticky;
@@ -548,7 +565,7 @@ thead th {
548
  .dataframe {
549
  max-height: none !important;
550
  overflow-y: visible !important;
551
- overflow-x: auto !important;
552
  display: block;
553
  }
554
  .dataframe > div {
@@ -558,7 +575,7 @@ thead th {
558
  td {
559
  font-size: 18px !important;
560
  white-space: pre-wrap !important;
561
- word-break: break-word !important;
562
  line-height: 1.6;
563
  padding: 10px;
564
  vertical-align: top !important;
 
501
  # 5. Application Styling (CSS)
502
  # ==========================================
503
  css = """
504
+ /* ----------------------------------------------------
505
+ [1] ๊ธฐ๋ณธ ์„ค์ • (7์—ด ์ด์ƒ ๋‹ค์ค‘ ์—ด ๊ธฐ์ค€)
506
+ - ์—ด์ด ๋งŽ์„ ๊ฒฝ์šฐ 100%๋ฅผ ๋„˜์–ด์„œ ์ž์—ฐ์Šค๋Ÿฝ๊ฒŒ ์Šคํฌ๋กค๋˜๋„๋ก ์„ค์ •
507
+ ---------------------------------------------------- */
508
  table {
509
+ table-layout: auto !important;
510
+ width: max-content !important;
511
+ min-width: 100% !important;
512
  }
513
 
 
514
  th, td {
515
+ min-width: 150px; /* ์—ด์ด ๋งŽ์•„๋„ ๊ธ€์ž๊ฐ€ ๊นจ์ง€์ง€ ์•Š๊ฒŒ ์ตœ์†Œ ๋„ˆ๋น„ ๋ฐฉ์–ด */
516
+ }
517
+
518
+ /* ----------------------------------------------------
519
+ [2] 2, 4, 5, 6์—ด ์กฐ๊ฑด๋ถ€ ์„ค์ • (์ง€์ •ํ•˜์‹  ๋น„์œจ ์™„๋ฒฝ ๋ณต๊ตฌ)
520
+ - ํ•ด๋‹น ์—ด ๊ฐœ์ˆ˜์ผ ๋•Œ๋งŒ ๊ณ ์ • ๋ ˆ์ด์•„์›ƒ(fixed) ์ ์šฉ
521
+ ---------------------------------------------------- */
522
+ table:has(th:nth-last-child(2):first-child),
523
+ table:has(th:nth-last-child(4):first-child),
524
+ table:has(th:nth-last-child(5):first-child),
525
+ table:has(th:nth-last-child(6):first-child) {
526
+ table-layout: fixed !important;
527
+ width: 100% !important;
528
  }
529
 
 
530
  /* 2์ปฌ๋Ÿผ */
531
  table th:nth-last-child(2):first-child, table td:nth-last-child(2):first-child { width: 15% !important; min-width: 0 !important; }
532
  table th:nth-last-child(1), table td:nth-last-child(1) { width: 85% !important; min-width: 0 !important; }
 
552
  table th:nth-child(5):nth-last-child(2), table td:nth-child(5):nth-last-child(2) { width: 8% !important; min-width: 0 !important; }
553
  table th:nth-child(6):nth-last-child(1), table td:nth-child(6):nth-last-child(1) { width: 26% !important; min-width: 0 !important; }
554
 
555
+ /* ----------------------------------------------------
556
+ [3] ๋ฐ์ดํ„ฐํ”„๋ ˆ์ž„ ๋ฐ ํ—ค๋” ๊ธฐ๋ณธ ์Šคํฌ๋กค/ํ…์ŠคํŠธ ์„ค์ •
557
+ ---------------------------------------------------- */
558
  thead th {
559
  font-size: 18px !important;
560
  position: sticky;
 
565
  .dataframe {
566
  max-height: none !important;
567
  overflow-y: visible !important;
568
+ overflow-x: auto !important; /* ์ขŒ์šฐ ์Šคํฌ๋กค๋ฐ” ํ—ˆ์šฉ */
569
  display: block;
570
  }
571
  .dataframe > div {
 
575
  td {
576
  font-size: 18px !important;
577
  white-space: pre-wrap !important;
578
+ word-break: keep-all !important; /* ์•ŒํŒŒ๋ฒณ์ด ํ•˜๋‚˜์”ฉ ์ฐข์–ด์ง€๋Š” ํ˜„์ƒ ๋ฐฉ์ง€ */
579
  line-height: 1.6;
580
  padding: 10px;
581
  vertical-align: top !important;