Spaces:
Sleeping
Sleeping
Commit
·
1d0cd2a
1
Parent(s):
0627d63
Fix dark mode input visibility
Browse filesAdd custom CSS to ensure text inputs are readable on hover/focus
in dark mode.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
app.py
CHANGED
|
@@ -228,9 +228,30 @@ def create_app():
|
|
| 228 |
# Create the app
|
| 229 |
app = create_app()
|
| 230 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 231 |
if __name__ == "__main__":
|
| 232 |
app.launch(
|
| 233 |
server_name="0.0.0.0",
|
| 234 |
server_port=7860,
|
| 235 |
share=False,
|
|
|
|
| 236 |
)
|
|
|
|
| 228 |
# Create the app
|
| 229 |
app = create_app()
|
| 230 |
|
| 231 |
+
CUSTOM_CSS = """
|
| 232 |
+
/* Fix dark mode input visibility */
|
| 233 |
+
input, textarea, select {
|
| 234 |
+
color: var(--body-text-color) !important;
|
| 235 |
+
background-color: var(--input-background-fill) !important;
|
| 236 |
+
}
|
| 237 |
+
|
| 238 |
+
input:hover, textarea:hover, select:hover,
|
| 239 |
+
input:focus, textarea:focus, select:focus {
|
| 240 |
+
color: var(--body-text-color) !important;
|
| 241 |
+
background-color: var(--input-background-fill) !important;
|
| 242 |
+
}
|
| 243 |
+
|
| 244 |
+
/* Ensure placeholder is visible */
|
| 245 |
+
input::placeholder, textarea::placeholder {
|
| 246 |
+
color: var(--body-text-color-subdued) !important;
|
| 247 |
+
opacity: 0.7;
|
| 248 |
+
}
|
| 249 |
+
"""
|
| 250 |
+
|
| 251 |
if __name__ == "__main__":
|
| 252 |
app.launch(
|
| 253 |
server_name="0.0.0.0",
|
| 254 |
server_port=7860,
|
| 255 |
share=False,
|
| 256 |
+
css=CUSTOM_CSS,
|
| 257 |
)
|