ui: bump text contrast — readable ink on dark panels, fix Gradio info/placeholder text
Browse files
app.py
CHANGED
|
@@ -171,9 +171,9 @@ CSS = """
|
|
| 171 |
--emerald-glow: #00ff8c;
|
| 172 |
--cyan: #00e5ff;
|
| 173 |
--leaf: #7dd3a8;
|
| 174 |
-
--ink: #
|
| 175 |
-
--ink-dim: #
|
| 176 |
-
--ink-muted: #
|
| 177 |
--line: rgba(125, 211, 168, 0.14);
|
| 178 |
--line-bright: rgba(125, 211, 168, 0.28);
|
| 179 |
--panel: rgba(10, 28, 22, 0.55);
|
|
@@ -491,6 +491,61 @@ html, body, gradio-app, .gradio-container {
|
|
| 491 |
/* ===== Footer ===== */
|
| 492 |
.gradio-container a { color: var(--leaf) !important; }
|
| 493 |
.gradio-container a:hover { color: var(--emerald-glow) !important; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 494 |
"""
|
| 495 |
|
| 496 |
HERO_HTML = """
|
|
|
|
| 171 |
--emerald-glow: #00ff8c;
|
| 172 |
--cyan: #00e5ff;
|
| 173 |
--leaf: #7dd3a8;
|
| 174 |
+
--ink: #f1faf4;
|
| 175 |
+
--ink-dim: #b8d2c6;
|
| 176 |
+
--ink-muted: #8aa79b;
|
| 177 |
--line: rgba(125, 211, 168, 0.14);
|
| 178 |
--line-bright: rgba(125, 211, 168, 0.28);
|
| 179 |
--panel: rgba(10, 28, 22, 0.55);
|
|
|
|
| 491 |
/* ===== Footer ===== */
|
| 492 |
.gradio-container a { color: var(--leaf) !important; }
|
| 493 |
.gradio-container a:hover { color: var(--emerald-glow) !important; }
|
| 494 |
+
|
| 495 |
+
/* ===== Force readable text everywhere ===== */
|
| 496 |
+
.gradio-container,
|
| 497 |
+
.gradio-container p,
|
| 498 |
+
.gradio-container span,
|
| 499 |
+
.gradio-container div {
|
| 500 |
+
color: var(--ink);
|
| 501 |
+
}
|
| 502 |
+
.gradio-container [class*="markdown"] p,
|
| 503 |
+
.gradio-container [class*="markdown"] li,
|
| 504 |
+
.gradio-container [class*="markdown"] td {
|
| 505 |
+
color: var(--ink) !important;
|
| 506 |
+
}
|
| 507 |
+
/* Gradio's small "info" / helper text under inputs */
|
| 508 |
+
.gradio-container [class*="info"],
|
| 509 |
+
.gradio-container [class*="hint"],
|
| 510 |
+
.gradio-container [class*="description"],
|
| 511 |
+
.gradio-container [class*="help"],
|
| 512 |
+
.gradio-container small {
|
| 513 |
+
color: var(--ink-dim) !important;
|
| 514 |
+
font-size: 0.82rem !important;
|
| 515 |
+
font-weight: 400 !important;
|
| 516 |
+
letter-spacing: 0 !important;
|
| 517 |
+
text-transform: none !important;
|
| 518 |
+
opacity: 1 !important;
|
| 519 |
+
margin-top: 6px !important;
|
| 520 |
+
}
|
| 521 |
+
/* Placeholder text */
|
| 522 |
+
.gradio-container input::placeholder,
|
| 523 |
+
.gradio-container textarea::placeholder {
|
| 524 |
+
color: var(--ink-muted) !important;
|
| 525 |
+
opacity: 1 !important;
|
| 526 |
+
}
|
| 527 |
+
/* Example gallery cells text */
|
| 528 |
+
.gradio-container [class*="examples"] td,
|
| 529 |
+
.gradio-container [class*="examples"] span,
|
| 530 |
+
.gradio-container [class*="example"] span {
|
| 531 |
+
color: var(--ink) !important;
|
| 532 |
+
}
|
| 533 |
+
/* Image upload "drop image here" / "click to upload" text */
|
| 534 |
+
.gradio-container [class*="image"] [class*="upload"] *,
|
| 535 |
+
.gradio-container [class*="upload-text"],
|
| 536 |
+
.gradio-container [class*="empty"] {
|
| 537 |
+
color: var(--ink-dim) !important;
|
| 538 |
+
}
|
| 539 |
+
/* Radio option text — keep readable when not selected */
|
| 540 |
+
.gradio-container [role="radio"]:not([aria-checked="true"]),
|
| 541 |
+
.gradio-container [class*="radio"] label:not([class*="selected"]) {
|
| 542 |
+
color: var(--ink) !important;
|
| 543 |
+
}
|
| 544 |
+
/* Dropdown selected value */
|
| 545 |
+
.gradio-container [class*="dropdown"] input,
|
| 546 |
+
.gradio-container [class*="dropdown"] [class*="single"] {
|
| 547 |
+
color: var(--ink) !important;
|
| 548 |
+
}
|
| 549 |
"""
|
| 550 |
|
| 551 |
HERO_HTML = """
|