Threadbourne commited on
Commit
c20265b
·
verified ·
1 Parent(s): d1b9fce

Delete custom.css

Browse files
Files changed (1) hide show
  1. custom.css +0 -382
custom.css DELETED
@@ -1,382 +0,0 @@
1
- /* ============================================================
2
- * uglytool.dev — After Hours theme (v2, aggressive specificity)
3
- *
4
- * Gradio:
5
- * with gr.Blocks(css="custom.css") as demo:
6
- * ...
7
- *
8
- * Streamlit:
9
- * with open("custom.css") as f:
10
- * st.markdown(f"<style>{f.read()}</style>", unsafe_allow_html=True)
11
- *
12
- * You bought this file. Modify whatever you want — remove the credit,
13
- * tweak the amber, swap the font. It's yours now.
14
- * ============================================================ */
15
-
16
- @import url('https://fonts.googleapis.com/css2?family=Syne:wght@600;700;800&family=DM+Sans:wght@300;400;500&family=DM+Mono:wght@400;500&display=swap');
17
-
18
- /* ============================================================
19
- * Part 1 — Gradio theme variables (the primary customization hook)
20
- * Override on :root AND on the dark-mode variant so the cascade
21
- * picks these up regardless of which flag the host set.
22
- * ============================================================ */
23
-
24
- :root,
25
- :root.dark,
26
- .gradio-container,
27
- .gradio-container.dark,
28
- body.dark {
29
- /* After Hours palette */
30
- --ah-bg: #1a1917;
31
- --ah-bg-raised: #222120;
32
- --ah-surface: #2a2826;
33
- --ah-border: rgba(255, 255, 255, 0.07);
34
- --ah-border-focus: rgba(193, 127, 58, 0.5);
35
- --ah-amber: #c17f3a;
36
- --ah-amber-dim: rgba(193, 127, 58, 0.12);
37
- --ah-text: #f0ece4;
38
- --ah-muted: #8a8278;
39
- --ah-dim: #5a5650;
40
-
41
- /* Gradio — colors */
42
- --body-background-fill: var(--ah-bg);
43
- --background-fill-primary: var(--ah-bg-raised);
44
- --background-fill-secondary: var(--ah-surface);
45
- --body-text-color: var(--ah-text);
46
- --body-text-color-subdued: var(--ah-muted);
47
- --color-accent: var(--ah-amber);
48
- --color-accent-soft: var(--ah-amber-dim);
49
- --border-color-primary: var(--ah-border);
50
- --border-color-accent: var(--ah-border-focus);
51
-
52
- /* Gradio — blocks (cards) */
53
- --block-background-fill: var(--ah-bg-raised);
54
- --block-border-color: var(--ah-border);
55
- --block-border-width: 1px;
56
- --block-radius: 6px;
57
- --block-shadow: none;
58
-
59
- /* Gradio — block titles + labels (this is where headings/labels live) */
60
- --block-title-background-fill: transparent;
61
- --block-title-border-color: transparent;
62
- --block-title-text-color: var(--ah-text);
63
- --block-title-text-size: 0.9rem;
64
- --block-title-text-weight: 700;
65
- --block-label-background-fill: transparent;
66
- --block-label-border-color: transparent;
67
- --block-label-text-color: var(--ah-amber);
68
- --block-label-text-size: 0.72rem;
69
- --block-label-text-weight: 500;
70
-
71
- /* Gradio — inputs */
72
- --input-background-fill: var(--ah-surface);
73
- --input-background-fill-focus: var(--ah-surface);
74
- --input-border-color: var(--ah-border);
75
- --input-border-color-focus: var(--ah-border-focus);
76
- --input-text-size: 0.88rem;
77
- --input-radius: 6px;
78
-
79
- /* Gradio — buttons */
80
- --button-primary-background-fill: var(--ah-amber);
81
- --button-primary-background-fill-hover: #b87234;
82
- --button-primary-text-color: var(--ah-bg);
83
- --button-primary-text-color-hover: var(--ah-bg);
84
- --button-primary-border-color: var(--ah-amber);
85
- --button-secondary-background-fill: var(--ah-surface);
86
- --button-secondary-background-fill-hover: #342f2a;
87
- --button-secondary-text-color: var(--ah-text);
88
- --button-secondary-text-color-hover: var(--ah-text);
89
- --button-secondary-border-color: var(--ah-border);
90
- --button-large-text-size: 0.9rem;
91
- --button-large-text-weight: 700;
92
- --button-large-radius: 6px;
93
-
94
- /* Sliders */
95
- --slider-color: var(--ah-amber);
96
-
97
- /* Typography — Gradio only exposes one font variable; we win
98
- heading specificity via selectors below. */
99
- --font: 'DM Sans', ui-sans-serif, system-ui, sans-serif;
100
- --font-mono: 'DM Mono', ui-monospace, monospace;
101
-
102
- /* Radii */
103
- --radius-xxs: 2px;
104
- --radius-xs: 4px;
105
- --radius-sm: 6px;
106
- --radius-md: 8px;
107
- --radius-lg: 10px;
108
- }
109
-
110
- /* ============================================================
111
- * Part 2 — Root containers (beat default light/dark mode rules)
112
- * ============================================================ */
113
-
114
- html body,
115
- html body.dark,
116
- html body .gradio-container,
117
- html body .gradio-container.dark,
118
- html body .stApp,
119
- html body .stApp > div,
120
- html body [data-testid="stAppViewContainer"] {
121
- background: var(--ah-bg) !important;
122
- color: var(--ah-text) !important;
123
- font-family: 'DM Sans', ui-sans-serif, system-ui, sans-serif !important;
124
- }
125
-
126
- html body .main .block-container,
127
- html body .stApp [data-testid="stVerticalBlock"] {
128
- background: var(--ah-bg) !important;
129
- }
130
-
131
- /* ============================================================
132
- * Part 3 — Typography (html body prefix to win most specificity wars)
133
- * Headings go to Syne; labels go to DM Mono amber caps.
134
- * ============================================================ */
135
-
136
- html body h1, html body h2, html body h3, html body h4, html body h5, html body h6,
137
- html body .gradio-container h1, html body .gradio-container h2, html body .gradio-container h3,
138
- html body .gradio-container h4, html body .gradio-container h5, html body .gradio-container h6,
139
- html body .prose h1, html body .prose h2, html body .prose h3, html body .prose h4,
140
- html body .markdown h1, html body .markdown h2, html body .markdown h3,
141
- html body .gr-markdown h1, html body .gr-markdown h2, html body .gr-markdown h3,
142
- html body .stApp h1, html body .stApp h2, html body .stApp h3,
143
- html body [data-testid="stMarkdownContainer"] h1,
144
- html body [data-testid="stMarkdownContainer"] h2,
145
- html body [data-testid="stMarkdownContainer"] h3 {
146
- font-family: 'Syne', ui-sans-serif, sans-serif !important;
147
- font-weight: 700 !important;
148
- letter-spacing: -0.02em !important;
149
- color: var(--ah-text) !important;
150
- line-height: 1.15 !important;
151
- }
152
-
153
- /* Labels — Gradio: .block-label / .svelte-label / <label>.
154
- Streamlit: [data-testid="stWidgetLabel"]. Cover all known variants. */
155
- html body .gradio-container .block-label,
156
- html body .gradio-container .block-label *,
157
- html body .gradio-container label,
158
- html body .gradio-container label > *,
159
- html body .gradio-container [class*="label-wrap"],
160
- html body .gradio-container [class*="label-wrap"] *,
161
- html body .gradio-container [data-testid*="label"],
162
- html body .gradio-container .wrap > label,
163
- html body .stApp label,
164
- html body .stApp [data-testid="stWidgetLabel"],
165
- html body .stApp [data-testid="stWidgetLabel"] > *,
166
- html body .stApp [data-testid="stWidgetLabel"] p {
167
- font-family: 'DM Mono', ui-monospace, monospace !important;
168
- font-size: 0.72rem !important;
169
- color: var(--ah-amber) !important;
170
- letter-spacing: 0.12em !important;
171
- text-transform: uppercase !important;
172
- font-weight: 500 !important;
173
- background: transparent !important;
174
- }
175
-
176
- /* ============================================================
177
- * Part 4 — Blocks / cards
178
- * ============================================================ */
179
-
180
- html body .gradio-container .block,
181
- html body .gradio-container .gr-block,
182
- html body .gradio-container .gr-padded,
183
- html body .gradio-container .gr-form,
184
- html body .gradio-container .gr-box,
185
- html body .gradio-container .wrap,
186
- html body .stApp [data-testid="stForm"],
187
- html body .stApp [data-testid="stExpander"] {
188
- background: var(--ah-bg-raised) !important;
189
- border: 1px solid var(--ah-border) !important;
190
- border-radius: 6px !important;
191
- }
192
-
193
- /* ============================================================
194
- * Part 5 — Inputs
195
- * ============================================================ */
196
-
197
- html body .gradio-container input[type="text"],
198
- html body .gradio-container input[type="number"],
199
- html body .gradio-container input[type="email"],
200
- html body .gradio-container input[type="password"],
201
- html body .gradio-container input[type="search"],
202
- html body .gradio-container textarea,
203
- html body .gradio-container select,
204
- html body .gradio-container .gr-textbox,
205
- html body .gradio-container .gr-textbox textarea,
206
- html body .gradio-container .gr-textbox input,
207
- html body .stApp input[type="text"],
208
- html body .stApp input[type="number"],
209
- html body .stApp textarea,
210
- html body .stApp [data-baseweb="select"] > div,
211
- html body .stApp [data-baseweb="input"] {
212
- background: var(--ah-surface) !important;
213
- border: 1px solid var(--ah-border) !important;
214
- border-radius: 6px !important;
215
- color: var(--ah-text) !important;
216
- font-family: 'DM Mono', ui-monospace, monospace !important;
217
- font-size: 0.88rem !important;
218
- caret-color: var(--ah-amber) !important;
219
- padding: 12px 14px !important;
220
- }
221
-
222
- html body .gradio-container textarea,
223
- html body .stApp textarea {
224
- min-height: 120px !important;
225
- line-height: 1.6 !important;
226
- }
227
-
228
- html body .gradio-container input:focus,
229
- html body .gradio-container textarea:focus,
230
- html body .gradio-container select:focus,
231
- html body .stApp input:focus,
232
- html body .stApp textarea:focus {
233
- border-color: var(--ah-border-focus) !important;
234
- outline: none !important;
235
- box-shadow: 0 0 0 1px var(--ah-border-focus) !important;
236
- }
237
-
238
- html body .gradio-container ::placeholder,
239
- html body .stApp ::placeholder {
240
- color: var(--ah-dim) !important;
241
- }
242
-
243
- /* ============================================================
244
- * Part 6 — Buttons
245
- * ============================================================ */
246
-
247
- html body .gradio-container button,
248
- html body .gradio-container .gr-button,
249
- html body .gradio-container [class*="gr-button"],
250
- html body .gradio-container button.primary,
251
- html body .gradio-container .primary,
252
- html body .stApp .stButton > button,
253
- html body .stApp button[kind="primary"] {
254
- background: var(--ah-amber) !important;
255
- color: var(--ah-bg) !important;
256
- font-family: 'Syne', ui-sans-serif, sans-serif !important;
257
- font-weight: 700 !important;
258
- font-size: 0.9rem !important;
259
- letter-spacing: 0.04em !important;
260
- border: none !important;
261
- border-radius: 6px !important;
262
- padding: 12px 28px !important;
263
- cursor: pointer !important;
264
- transition: opacity 150ms, transform 100ms !important;
265
- }
266
-
267
- html body .gradio-container button:hover,
268
- html body .gradio-container .gr-button:hover,
269
- html body .stApp .stButton > button:hover {
270
- opacity: 0.9 !important;
271
- background: var(--ah-amber) !important;
272
- color: var(--ah-bg) !important;
273
- }
274
-
275
- html body .gradio-container button:active,
276
- html body .stApp .stButton > button:active {
277
- transform: scale(0.995) !important;
278
- }
279
-
280
- html body .gradio-container button.secondary,
281
- html body .gradio-container .secondary,
282
- html body .stApp button[kind="secondary"] {
283
- background: var(--ah-surface) !important;
284
- color: var(--ah-text) !important;
285
- border: 1px solid var(--ah-border) !important;
286
- }
287
-
288
- /* ============================================================
289
- * Part 7 — Sliders, checkboxes, radios
290
- * ============================================================ */
291
-
292
- html body input[type="range"] { accent-color: var(--ah-amber) !important; }
293
- html body input[type="range"]::-webkit-slider-thumb {
294
- background: var(--ah-amber) !important;
295
- border: 2px solid var(--ah-bg) !important;
296
- box-shadow: 0 0 0 1px rgba(193, 127, 58, 0.3) !important;
297
- }
298
- html body input[type="range"]::-moz-range-thumb {
299
- background: var(--ah-amber) !important;
300
- border: 2px solid var(--ah-bg) !important;
301
- }
302
- html body input[type="checkbox"],
303
- html body input[type="radio"] {
304
- accent-color: var(--ah-amber) !important;
305
- }
306
-
307
- /* ============================================================
308
- * Part 8 — File uploads
309
- * ============================================================ */
310
-
311
- html body .gradio-container .gr-file-upload,
312
- html body .gradio-container input[type="file"],
313
- html body .stApp [data-testid="stFileUploader"],
314
- html body .stApp [data-testid="stFileUploaderDropzone"] {
315
- background: var(--ah-surface) !important;
316
- border: 1px dashed var(--ah-border) !important;
317
- border-radius: 6px !important;
318
- color: var(--ah-text) !important;
319
- }
320
-
321
- html body input[type="file"]::file-selector-button {
322
- background: var(--ah-amber-dim) !important;
323
- color: var(--ah-amber) !important;
324
- border: 1px solid rgba(193, 127, 58, 0.25) !important;
325
- border-radius: 4px !important;
326
- padding: 6px 12px !important;
327
- margin-right: 12px !important;
328
- font-family: 'DM Mono', ui-monospace, monospace !important;
329
- font-size: 0.78rem !important;
330
- cursor: pointer !important;
331
- }
332
-
333
- /* ============================================================
334
- * Part 9 — Markdown, code, links
335
- * ============================================================ */
336
-
337
- html body .gradio-container .markdown,
338
- html body .gradio-container .gr-markdown,
339
- html body .gradio-container .prose,
340
- html body .stApp [data-testid="stMarkdownContainer"] {
341
- color: var(--ah-text) !important;
342
- font-family: 'DM Sans', ui-sans-serif, sans-serif !important;
343
- line-height: 1.6 !important;
344
- }
345
-
346
- html body .gradio-container a,
347
- html body .stApp a {
348
- color: var(--ah-amber) !important;
349
- }
350
-
351
- html body code,
352
- html body .gradio-container code,
353
- html body .stApp code {
354
- background: var(--ah-surface) !important;
355
- color: var(--ah-amber) !important;
356
- font-family: 'DM Mono', ui-monospace, monospace !important;
357
- padding: 2px 6px !important;
358
- border-radius: 3px !important;
359
- }
360
-
361
- /* ============================================================
362
- * Part 10 — Scrollbars + Streamlit chrome
363
- * ============================================================ */
364
-
365
- html body ::-webkit-scrollbar { width: 8px; height: 8px; }
366
- html body ::-webkit-scrollbar-track { background: var(--ah-bg); }
367
- html body ::-webkit-scrollbar-thumb {
368
- background: rgba(193, 127, 58, 0.3);
369
- border-radius: 4px;
370
- }
371
- html body ::-webkit-scrollbar-thumb:hover {
372
- background: rgba(193, 127, 58, 0.5);
373
- }
374
-
375
- html body .stApp header[data-testid="stHeader"] {
376
- background: var(--ah-bg) !important;
377
- border-bottom: 1px solid var(--ah-border) !important;
378
- }
379
- html body .stApp [data-testid="stSidebar"] {
380
- background: var(--ah-bg-raised) !important;
381
- border-right: 1px solid var(--ah-border) !important;
382
- }