Spaces:
Sleeping
Sleeping
Commit
·
db9e075
1
Parent(s):
3739861
update
Browse files
app.py
CHANGED
|
@@ -3,45 +3,68 @@ from tinysql_dataset_viewer import dataset_viewer
|
|
| 3 |
import gradio as gr
|
| 4 |
|
| 5 |
custom_css = """
|
| 6 |
-
/*
|
| 7 |
-
|
| 8 |
background-color: #0A0A0A !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
color: #E0E0E0 !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
}
|
| 11 |
|
| 12 |
-
/* Override for specific dark elements that should stay darker */
|
| 13 |
-
input, textarea, select, table, .dataframe,
|
| 14 |
table td, table th, .dataframe td, .dataframe th {
|
| 15 |
background-color: #1A1A1A !important;
|
| 16 |
color: #E0E0E0 !important;
|
| 17 |
}
|
| 18 |
|
| 19 |
-
/*
|
| 20 |
-
table td
|
|
|
|
| 21 |
background-color: transparent !important;
|
| 22 |
}
|
| 23 |
|
| 24 |
-
/*
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
[style*="background: #3A3A3A"],
|
| 28 |
-
[style*="background: #4A4A4A"] {
|
| 29 |
-
background: inherit !important;
|
| 30 |
}
|
| 31 |
|
| 32 |
-
/* Text inside
|
| 33 |
-
|
| 34 |
background-color: transparent !important;
|
| 35 |
}
|
| 36 |
|
| 37 |
-
|
| 38 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 39 |
}
|
| 40 |
|
| 41 |
-
/*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
.tab-nav {
|
| 43 |
background: #0A0A0A !important;
|
| 44 |
-
border: none !important;
|
| 45 |
}
|
| 46 |
|
| 47 |
.tab-nav button {
|
|
@@ -57,7 +80,7 @@ table td *, table th *, .dataframe td *, .dataframe th * {
|
|
| 57 |
}
|
| 58 |
|
| 59 |
/* Orange labels */
|
| 60 |
-
label
|
| 61 |
background: #FF6B4A !important;
|
| 62 |
color: white !important;
|
| 63 |
padding: 0.4rem 0.8rem !important;
|
|
@@ -66,7 +89,7 @@ label > span {
|
|
| 66 |
}
|
| 67 |
|
| 68 |
/* Orange buttons */
|
| 69 |
-
.primary
|
| 70 |
background: #FF6B4A !important;
|
| 71 |
color: white !important;
|
| 72 |
}
|
|
@@ -79,24 +102,6 @@ input[type="range"]::-webkit-slider-thumb {
|
|
| 79 |
input[type="range"]::-moz-range-thumb {
|
| 80 |
background: #FF6B4A !important;
|
| 81 |
}
|
| 82 |
-
|
| 83 |
-
/* Code blocks stay dark gray with transparent text containers */
|
| 84 |
-
pre, code, .code {
|
| 85 |
-
background: #1A1A1A !important;
|
| 86 |
-
}
|
| 87 |
-
|
| 88 |
-
pre *, code *, .code * {
|
| 89 |
-
background-color: transparent !important;
|
| 90 |
-
}
|
| 91 |
-
|
| 92 |
-
/* Line numbers in code should be transparent */
|
| 93 |
-
.cm-lineNumbers, .cm-gutters {
|
| 94 |
-
background: #1A1A1A !important;
|
| 95 |
-
}
|
| 96 |
-
|
| 97 |
-
.cm-line {
|
| 98 |
-
background: transparent !important;
|
| 99 |
-
}
|
| 100 |
"""
|
| 101 |
|
| 102 |
with gr.Blocks(css=custom_css, title="TinySQL Demo", theme=gr.themes.Base()) as demo:
|
|
|
|
| 3 |
import gradio as gr
|
| 4 |
|
| 5 |
custom_css = """
|
| 6 |
+
/* Force black background on EVERYTHING first */
|
| 7 |
+
* {
|
| 8 |
background-color: #0A0A0A !important;
|
| 9 |
+
}
|
| 10 |
+
|
| 11 |
+
/* Then selectively override what needs different colors */
|
| 12 |
+
|
| 13 |
+
/* Dark gray for inputs and tables */
|
| 14 |
+
input, textarea, select {
|
| 15 |
+
background-color: #1A1A1A !important;
|
| 16 |
color: #E0E0E0 !important;
|
| 17 |
+
border: 1px solid #3A3A3A !important;
|
| 18 |
+
}
|
| 19 |
+
|
| 20 |
+
/* Tables - dark gray background */
|
| 21 |
+
table, .dataframe {
|
| 22 |
+
background-color: #1A1A1A !important;
|
| 23 |
}
|
| 24 |
|
|
|
|
|
|
|
| 25 |
table td, table th, .dataframe td, .dataframe th {
|
| 26 |
background-color: #1A1A1A !important;
|
| 27 |
color: #E0E0E0 !important;
|
| 28 |
}
|
| 29 |
|
| 30 |
+
/* CRITICAL: Text inside tables should be transparent */
|
| 31 |
+
table td div, table td span, table td p,
|
| 32 |
+
table th div, table th span, table th p {
|
| 33 |
background-color: transparent !important;
|
| 34 |
}
|
| 35 |
|
| 36 |
+
/* Code editors - dark gray */
|
| 37 |
+
.code, pre, code {
|
| 38 |
+
background-color: #1A1A1A !important;
|
|
|
|
|
|
|
|
|
|
| 39 |
}
|
| 40 |
|
| 41 |
+
/* Text inside code blocks transparent */
|
| 42 |
+
.code *, pre *, code * {
|
| 43 |
background-color: transparent !important;
|
| 44 |
}
|
| 45 |
|
| 46 |
+
/* Keep gradient boxes with their inline styles */
|
| 47 |
+
div[style*="background: linear-gradient"],
|
| 48 |
+
div[style*="background: #2A2A2A"],
|
| 49 |
+
div[style*="background: #3A3A3A"] {
|
| 50 |
+
background: revert !important;
|
| 51 |
+
}
|
| 52 |
+
|
| 53 |
+
/* Text inside gradient boxes transparent */
|
| 54 |
+
div[style*="background"] span,
|
| 55 |
+
div[style*="background"] div:not([style*="background"]),
|
| 56 |
+
div[style*="background"] p {
|
| 57 |
+
background-color: transparent !important;
|
| 58 |
}
|
| 59 |
|
| 60 |
+
/* All text white */
|
| 61 |
+
*, h1, h2, h3, h4, h5, h6, p, span, div {
|
| 62 |
+
color: #E0E0E0 !important;
|
| 63 |
+
}
|
| 64 |
+
|
| 65 |
+
/* Tabs */
|
| 66 |
.tab-nav {
|
| 67 |
background: #0A0A0A !important;
|
|
|
|
| 68 |
}
|
| 69 |
|
| 70 |
.tab-nav button {
|
|
|
|
| 80 |
}
|
| 81 |
|
| 82 |
/* Orange labels */
|
| 83 |
+
label span {
|
| 84 |
background: #FF6B4A !important;
|
| 85 |
color: white !important;
|
| 86 |
padding: 0.4rem 0.8rem !important;
|
|
|
|
| 89 |
}
|
| 90 |
|
| 91 |
/* Orange buttons */
|
| 92 |
+
.primary {
|
| 93 |
background: #FF6B4A !important;
|
| 94 |
color: white !important;
|
| 95 |
}
|
|
|
|
| 102 |
input[type="range"]::-moz-range-thumb {
|
| 103 |
background: #FF6B4A !important;
|
| 104 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 105 |
"""
|
| 106 |
|
| 107 |
with gr.Blocks(css=custom_css, title="TinySQL Demo", theme=gr.themes.Base()) as demo:
|