Spaces:
Running on Zero
Running on Zero
UI: mobile responsiveness — stack layout, full-width columns, fix A/B + badge on small screens
Browse files
app.py
CHANGED
|
@@ -423,6 +423,18 @@ _CSS = f"""
|
|
| 423 |
.abcol {{ flex: 1; background: {PANEL}; border-radius: 10px; padding: 10px 12px; }}
|
| 424 |
.abhead {{ font-family: ui-monospace, monospace; font-size: 12px;
|
| 425 |
margin-bottom: 6px; }}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 426 |
</style>
|
| 427 |
"""
|
| 428 |
|
|
@@ -472,6 +484,16 @@ _APP_CSS = f"""
|
|
| 472 |
.primer-body li {{ color: {INK} !important; font-size: 14px; line-height: 1.5;
|
| 473 |
margin: 4px 0; }}
|
| 474 |
.primer-body a {{ color: {CYAN} !important; }}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 475 |
"""
|
| 476 |
|
| 477 |
|
|
|
|
| 423 |
.abcol {{ flex: 1; background: {PANEL}; border-radius: 10px; padding: 10px 12px; }}
|
| 424 |
.abhead {{ font-family: ui-monospace, monospace; font-size: 12px;
|
| 425 |
margin-bottom: 6px; }}
|
| 426 |
+
@media (max-width: 640px) {{
|
| 427 |
+
.toks {{ font-size: 14px; line-height: 1.95; }}
|
| 428 |
+
.tok:hover::after {{ white-space: normal; max-width: 80vw; }}
|
| 429 |
+
.meter {{ padding: 10px 12px; }}
|
| 430 |
+
.meter-row {{ font-size: 12px; }}
|
| 431 |
+
.meter-row b {{ font-size: 15px; }}
|
| 432 |
+
.abwrap {{ flex-direction: column; gap: 8px; }}
|
| 433 |
+
.lbars {{ height: 48px; }}
|
| 434 |
+
/* keep the round-trip badge from overlapping the verbalization label */
|
| 435 |
+
.rt {{ float: none; display: inline-block; margin: 4px 0 0; }}
|
| 436 |
+
.vmeta {{ display: block; margin-top: 2px; }}
|
| 437 |
+
}}
|
| 438 |
</style>
|
| 439 |
"""
|
| 440 |
|
|
|
|
| 484 |
.primer-body li {{ color: {INK} !important; font-size: 14px; line-height: 1.5;
|
| 485 |
margin: 4px 0; }}
|
| 486 |
.primer-body a {{ color: {CYAN} !important; }}
|
| 487 |
+
/* ── Mobile: stack the side-by-side layout and let widgets use full width.
|
| 488 |
+
Gradio tags rows/columns with bare 'row'/'column' class tokens (alongside a
|
| 489 |
+
build-specific svelte hash), so [class~=...] targets them hash-proof. ── */
|
| 490 |
+
@media (max-width: 768px) {{
|
| 491 |
+
.gradio-container {{ padding-left: 6px !important; padding-right: 6px !important; }}
|
| 492 |
+
.gradio-container [class~="row"] {{ flex-wrap: wrap !important; gap: 8px !important; }}
|
| 493 |
+
.gradio-container [class~="column"] {{ flex: 1 1 100% !important; min-width: 0 !important; }}
|
| 494 |
+
.gradio-container .tab-nav {{ overflow-x: auto !important; }}
|
| 495 |
+
.gradio-container img, .gradio-container svg {{ max-width: 100% !important; height: auto; }}
|
| 496 |
+
}}
|
| 497 |
"""
|
| 498 |
|
| 499 |
|