Spaces:
Sleeping
Update app.py
Browse filesWhat I restored:
Tab styling β Back to the original working version with proper color variables
Label styling β Using the original color scheme
Text elements β Restored to use CSS variables properly
What I kept targeted:
Button text β Only example buttons get dark text (not tab buttons)
Input text β Still white on dark backgrounds
Primary buttons β Keep white text on gradient backgrounds
Key changes:
β
Tabs β Should now show icons and text like version 4
β
"Keyword to analyze" β Should be visible with proper contrast
β
Example buttons β Still have dark readable text
β
No conflicts β Tab buttons excluded from button text rules
The CSS now uses :not(.gr-tab-nav button) selectors to avoid affecting tab styling while still fixing the example button text visibility.
@@ -393,7 +393,7 @@ footer {
|
|
393 |
color: var(--text-primary) !important;
|
394 |
}
|
395 |
|
396 |
-
/*
|
397 |
input, textarea {
|
398 |
color: #ffffff !important;
|
399 |
}
|
@@ -406,72 +406,37 @@ textarea {
|
|
406 |
color: #ffffff !important;
|
407 |
}
|
408 |
|
409 |
-
/*
|
410 |
-
.gr-button
|
411 |
-
|
412 |
-
}
|
413 |
-
|
414 |
-
/* Fix example button text - dark text on light background */
|
415 |
-
.gr-button span {
|
416 |
-
color: #1f2937 !important;
|
417 |
-
}
|
418 |
-
|
419 |
-
/* Fix any remaining text visibility issues in buttons */
|
420 |
-
.gr-button *, button * {
|
421 |
color: #1f2937 !important;
|
422 |
}
|
423 |
|
424 |
-
|
425 |
-
button
|
426 |
-
button div, .gr-button div,
|
427 |
-
button p, .gr-button p {
|
428 |
color: #1f2937 !important;
|
429 |
}
|
430 |
|
431 |
-
/*
|
432 |
-
.gr-button
|
433 |
-
.gr-button
|
434 |
-
|
435 |
-
button .wrap * {
|
436 |
-
color: #1f2937 !important;
|
437 |
-
}
|
438 |
-
|
439 |
-
/* Force all nested button elements to be dark */
|
440 |
-
.gr-button > *,
|
441 |
-
button > *,
|
442 |
-
.gr-button * * {
|
443 |
-
color: #1f2937 !important;
|
444 |
-
}
|
445 |
-
|
446 |
-
/* Override any inherited text colors in buttons - dark text */
|
447 |
-
[class*="button"] {
|
448 |
-
color: #1f2937 !important;
|
449 |
}
|
450 |
|
451 |
-
[
|
452 |
-
|
|
|
453 |
}
|
454 |
|
455 |
-
/*
|
456 |
-
.gr-row .gr-button
|
457 |
-
.gr-row button {
|
458 |
color: #1f2937 !important;
|
459 |
}
|
460 |
|
461 |
-
.gr-row .gr-button
|
462 |
-
.gr-row button * {
|
463 |
color: #1f2937 !important;
|
464 |
}
|
465 |
|
466 |
-
/* Special handling for primary buttons with gradients */
|
467 |
-
.gr-button.primary {
|
468 |
-
color: #ffffff !important;
|
469 |
-
}
|
470 |
-
|
471 |
-
.gr-button.primary * {
|
472 |
-
color: #ffffff !important;
|
473 |
-
}
|
474 |
-
|
475 |
/* Mobile responsiveness */
|
476 |
@media (max-width: 768px) {
|
477 |
.gradio-container h1 {
|
|
|
393 |
color: var(--text-primary) !important;
|
394 |
}
|
395 |
|
396 |
+
/* Text input fixes - keep white text on dark backgrounds */
|
397 |
input, textarea {
|
398 |
color: #ffffff !important;
|
399 |
}
|
|
|
406 |
color: #ffffff !important;
|
407 |
}
|
408 |
|
409 |
+
/* Button text fixes - dark text on light backgrounds */
|
410 |
+
.gr-button:not(.gr-tab-nav button),
|
411 |
+
button:not(.gr-tab-nav button) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
412 |
color: #1f2937 !important;
|
413 |
}
|
414 |
|
415 |
+
.gr-button:not(.gr-tab-nav button) *,
|
416 |
+
button:not(.gr-tab-nav button) * {
|
|
|
|
|
417 |
color: #1f2937 !important;
|
418 |
}
|
419 |
|
420 |
+
/* Primary/gradient buttons get white text */
|
421 |
+
.gr-button[variant="primary"],
|
422 |
+
.gr-button.primary {
|
423 |
+
color: #ffffff !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
424 |
}
|
425 |
|
426 |
+
.gr-button[variant="primary"] *,
|
427 |
+
.gr-button.primary * {
|
428 |
+
color: #ffffff !important;
|
429 |
}
|
430 |
|
431 |
+
/* Specifically target example buttons */
|
432 |
+
.gr-row .gr-button {
|
|
|
433 |
color: #1f2937 !important;
|
434 |
}
|
435 |
|
436 |
+
.gr-row .gr-button * {
|
|
|
437 |
color: #1f2937 !important;
|
438 |
}
|
439 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
440 |
/* Mobile responsiveness */
|
441 |
@media (max-width: 768px) {
|
442 |
.gradio-container h1 {
|