prashantAI Claude Opus 4.8 (1M context) commited on
Commit
8629759
·
1 Parent(s): c2cb46f

Make hero title bulletproof-visible

Browse files

Gradio's theme CSS was overriding the gradient background, leaving the
gradient-text title transparent (invisible). Force the gradient with
!important inside an @supports guard, and fall back to a solid visible
color where gradient-text isn't applied.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

Files changed (1) hide show
  1. app.py +13 -7
app.py CHANGED
@@ -385,15 +385,21 @@ body, .gradio-container {
385
  display: inline-block;
386
  font-size: 3.5rem;
387
  font-weight: 800;
388
- color: var(--accent-blue); /* fallback if background-clip:text is unsupported */
389
- background: linear-gradient(110deg, var(--accent-blue), var(--accent-purple), #F0ABFC, var(--accent-blue));
390
- background-size: 250% auto;
391
- -webkit-background-clip: text;
392
- background-clip: text;
393
- -webkit-text-fill-color: transparent;
394
  letter-spacing: -1px;
395
  margin-top: 0.5rem;
396
- animation: rdHero 7s ease infinite;
 
 
 
 
 
 
 
 
 
 
 
 
397
  }
398
  @keyframes rdHero {
399
  0% { background-position: 0% center; }
 
385
  display: inline-block;
386
  font-size: 3.5rem;
387
  font-weight: 800;
 
 
 
 
 
 
388
  letter-spacing: -1px;
389
  margin-top: 0.5rem;
390
+ color: #7DD3FC; /* solid, always-visible fallback */
391
+ }
392
+ /* Only apply the transparent gradient-text effect where it is actually supported,
393
+ and force our background to win over Gradio's theme CSS. */
394
+ @supports ((-webkit-background-clip: text) or (background-clip: text)) {
395
+ .hero-title {
396
+ background: linear-gradient(110deg, var(--accent-blue), var(--accent-purple), #F0ABFC, var(--accent-blue)) !important;
397
+ background-size: 250% auto !important;
398
+ -webkit-background-clip: text !important;
399
+ background-clip: text !important;
400
+ -webkit-text-fill-color: transparent !important;
401
+ animation: rdHero 7s ease infinite;
402
+ }
403
  }
404
  @keyframes rdHero {
405
  0% { background-position: 0% center; }