Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -274,40 +274,81 @@ div.examples span {
|
|
| 274 |
opacity: 1 !important;
|
| 275 |
}
|
| 276 |
|
| 277 |
-
/* 4. EXAMPLES
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 278 |
.examples button,
|
| 279 |
.examples [role="button"],
|
| 280 |
.examples .gallery-item {
|
| 281 |
background-color: #ffffff !important;
|
| 282 |
-
color: #000000 !important;
|
| 283 |
border: 1px solid #ccd5de !important;
|
| 284 |
}
|
| 285 |
-
|
| 286 |
-
|
| 287 |
-
.examples
|
| 288 |
-
.examples [role="button"] *,
|
| 289 |
-
.examples .gallery-item * {
|
| 290 |
color: #000000 !important;
|
| 291 |
}
|
| 292 |
-
|
| 293 |
-
|
| 294 |
-
|
| 295 |
-
.examples [role="button"]:hover,
|
| 296 |
-
.examples .gallery-item:hover,
|
| 297 |
-
.examples button.selected,
|
| 298 |
-
.examples [aria-selected="true"] {
|
| 299 |
-
background-color: #173a59 !important; /* Dark blue background so white text pops */
|
| 300 |
-
color: #ffffff !important; /* White text */
|
| 301 |
border-color: #173a59 !important;
|
| 302 |
}
|
| 303 |
-
|
| 304 |
-
|
| 305 |
-
.examples
|
| 306 |
-
.examples
|
| 307 |
-
.examples .
|
| 308 |
-
.examples button.selected *,
|
| 309 |
-
.examples [aria-selected="true"] * {
|
| 310 |
color: #ffffff !important;
|
|
|
|
| 311 |
}
|
| 312 |
"""
|
| 313 |
|
|
|
|
| 274 |
opacity: 1 !important;
|
| 275 |
}
|
| 276 |
|
| 277 |
+
/* 4. EXAMPLES — DATASET TABLE BASE STATE
|
| 278 |
+
Gradio renders gr.Examples as a samples TABLE (tbody > tr > td),
|
| 279 |
+
NOT as <button>. We must target the table rows/cells directly. */
|
| 280 |
+
.examples table,
|
| 281 |
+
.examples .gr-samples-table,
|
| 282 |
+
table.gr-samples-table,
|
| 283 |
+
.examples tbody,
|
| 284 |
+
.examples tr,
|
| 285 |
+
.examples td,
|
| 286 |
+
.gradio-container .examples tr td {
|
| 287 |
+
background-color: #ffffff !important;
|
| 288 |
+
color: #000000 !important;
|
| 289 |
+
border-color: #ccd5de !important;
|
| 290 |
+
}
|
| 291 |
+
.examples tr td,
|
| 292 |
+
.examples tr td * {
|
| 293 |
+
color: #000000 !important;
|
| 294 |
+
opacity: 1 !important;
|
| 295 |
+
}
|
| 296 |
+
|
| 297 |
+
/* 5. EXAMPLES — HOVER + SELECTED STATE
|
| 298 |
+
Apply the dark-blue background AND white text on the ROW and the CELL
|
| 299 |
+
itself (td), then force every descendant white. Targeting the td color
|
| 300 |
+
directly is what was missing before — hovering lands on the cell, not a button. */
|
| 301 |
+
.examples tr:hover,
|
| 302 |
+
.examples tr:hover td,
|
| 303 |
+
.examples tbody tr:hover td,
|
| 304 |
+
.gradio-container .examples tr:hover td,
|
| 305 |
+
.examples tr.selected,
|
| 306 |
+
.examples tr.selected td,
|
| 307 |
+
.examples tr[aria-selected="true"],
|
| 308 |
+
.examples tr[aria-selected="true"] td {
|
| 309 |
+
background-color: #173a59 !important; /* dark blue */
|
| 310 |
+
border-color: #173a59 !important;
|
| 311 |
+
}
|
| 312 |
+
|
| 313 |
+
.examples tr:hover td,
|
| 314 |
+
.examples tr:hover td *,
|
| 315 |
+
.examples tbody tr:hover td,
|
| 316 |
+
.examples tbody tr:hover td *,
|
| 317 |
+
.gradio-container .examples tr:hover td,
|
| 318 |
+
.gradio-container .examples tr:hover td *,
|
| 319 |
+
.examples tr.selected td,
|
| 320 |
+
.examples tr.selected td *,
|
| 321 |
+
.examples tr[aria-selected="true"] td,
|
| 322 |
+
.examples tr[aria-selected="true"] td * {
|
| 323 |
+
color: #ffffff !important; /* white text on hover */
|
| 324 |
+
-webkit-text-fill-color: #ffffff !important;
|
| 325 |
+
}
|
| 326 |
+
|
| 327 |
+
/* 6. Fallback: in case the build renders examples as buttons/gallery items,
|
| 328 |
+
keep the same behavior so it works either way. */
|
| 329 |
.examples button,
|
| 330 |
.examples [role="button"],
|
| 331 |
.examples .gallery-item {
|
| 332 |
background-color: #ffffff !important;
|
|
|
|
| 333 |
border: 1px solid #ccd5de !important;
|
| 334 |
}
|
| 335 |
+
.examples button, .examples button *,
|
| 336 |
+
.examples [role="button"], .examples [role="button"] *,
|
| 337 |
+
.examples .gallery-item, .examples .gallery-item * {
|
|
|
|
|
|
|
| 338 |
color: #000000 !important;
|
| 339 |
}
|
| 340 |
+
.examples button:hover, .examples [role="button"]:hover, .examples .gallery-item:hover,
|
| 341 |
+
.examples button.selected, .examples [aria-selected="true"] {
|
| 342 |
+
background-color: #173a59 !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 343 |
border-color: #173a59 !important;
|
| 344 |
}
|
| 345 |
+
.examples button:hover, .examples button:hover *,
|
| 346 |
+
.examples [role="button"]:hover, .examples [role="button"]:hover *,
|
| 347 |
+
.examples .gallery-item:hover, .examples .gallery-item:hover *,
|
| 348 |
+
.examples button.selected, .examples button.selected *,
|
| 349 |
+
.examples [aria-selected="true"], .examples [aria-selected="true"] * {
|
|
|
|
|
|
|
| 350 |
color: #ffffff !important;
|
| 351 |
+
-webkit-text-fill-color: #ffffff !important;
|
| 352 |
}
|
| 353 |
"""
|
| 354 |
|