chuckfinca Claude Opus 4.6 (1M context) commited on
Commit
0b9f4c4
·
1 Parent(s): ad0c365

Aggressive CSS reset: nuke all Gradio chrome, fix focus indicator

Browse files

- Wildcard box-shadow removal across all Gradio elements
- Hide all chatbot buttons via CSS
- Kill focus indicator bars and blue underlines
- Tighter vertical spacing
- Inter font via theme
- Disclaimer as quiet footnote

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

Files changed (1) hide show
  1. app.py +41 -41
app.py CHANGED
@@ -271,88 +271,88 @@ appsimple_theme = gr.themes.Base(
271
  radius_size=gr.themes.Size(
272
  lg="12px", md="8px", sm="4px", xl="16px", xxl="24px", xs="2px", xxs="1px",
273
  ),
 
274
  )
275
 
276
  CUSTOM_CSS = """
277
  @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&display=swap');
278
 
279
- /* Reset Gradio container — no visual footprint */
280
  footer { display: none !important; }
281
  .gradio-container {
282
  max-width: 100% !important;
283
  padding: 0 !important;
284
  background: transparent !important;
285
- font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif !important;
286
  }
287
 
288
- /* Remove all borders, shadows, backgrounds from components */
289
- #question-input, #chat-output {
290
- border: none !important;
291
  box-shadow: none !important;
292
- background: transparent !important;
293
  }
294
-
295
- /* Input field — minimal, just a bottom border */
296
- #question-input, #question-input > * {
297
- background: transparent !important;
298
  border: none !important;
299
- border-radius: 0 !important;
300
- box-shadow: none !important;
301
- }
302
- #question-input textarea, #question-input input {
303
  background: transparent !important;
304
- border: none !important;
 
 
 
305
  border-bottom: 1px solid #E5E7EB !important;
306
  border-radius: 0 !important;
307
  padding: 8px 0 !important;
308
- font-family: inherit !important;
309
  font-size: 16px !important;
310
  color: #1F2937 !important;
311
- box-shadow: none !important;
312
  }
313
- #question-input textarea:focus, #question-input input:focus {
314
  border-bottom-color: #4682B4 !important;
315
  outline: none !important;
316
- box-shadow: none !important;
317
  }
318
- #question-input textarea::placeholder, #question-input input::placeholder {
319
  color: #9CA3AF !important;
320
  }
321
- /* Kill Gradio's focus indicator bar */
322
- #question-input .focus-indicator, #question-input [class*="focus"] {
 
 
323
  display: none !important;
324
  }
325
 
326
- /* Chat messages — clean, no bubbles */
327
- #chat-output .message {
 
 
 
328
  border: none !important;
329
- background: transparent !important;
330
- box-shadow: none !important;
331
- padding: 12px 0 !important;
332
  }
333
- #chat-output .user-message, #chat-output .bot-message,
334
- #chat-output .message-row {
335
- background: transparent !important;
336
- }
337
- #chat-output .bubble-wrap {
338
  background: transparent !important;
339
  border: none !important;
340
- padding: 0 !important;
 
 
 
 
 
341
  }
342
 
343
- /* Hide Gradio processing spinner */
344
- .progress-bar, .eta-bar, .generating,
345
- [data-testid="status-generating"],
346
- .wrap.generating { display: none !important; }
347
 
348
  /* Accordion (Trace) — subtle */
349
- .accordion { border: none !important; }
350
 
351
- /* Disclaimer text — quiet footnote */
352
- .disclaimer-text {
353
  font-size: 12px !important;
354
  color: #9CA3AF !important;
355
- line-height: 1.5 !important;
356
  }
357
  .disclaimer-text a {
358
  color: #D97706 !important;
 
271
  radius_size=gr.themes.Size(
272
  lg="12px", md="8px", sm="4px", xl="16px", xxl="24px", xs="2px", xxs="1px",
273
  ),
274
+ font=("Inter", "system-ui", "sans-serif"),
275
  )
276
 
277
  CUSTOM_CSS = """
278
  @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&display=swap');
279
 
280
+ /* Reset Gradio container */
281
  footer { display: none !important; }
282
  .gradio-container {
283
  max-width: 100% !important;
284
  padding: 0 !important;
285
  background: transparent !important;
 
286
  }
287
 
288
+ /* Nuke ALL borders, shadows, backgrounds, wrappers */
289
+ .gradio-container * {
 
290
  box-shadow: none !important;
 
291
  }
292
+ #question-input, #question-input > *,
293
+ #chat-output, #chat-output > * {
 
 
294
  border: none !important;
 
 
 
 
295
  background: transparent !important;
296
+ }
297
+
298
+ /* Input field — just a bottom border */
299
+ #question-input textarea {
300
  border-bottom: 1px solid #E5E7EB !important;
301
  border-radius: 0 !important;
302
  padding: 8px 0 !important;
 
303
  font-size: 16px !important;
304
  color: #1F2937 !important;
 
305
  }
306
+ #question-input textarea:focus {
307
  border-bottom-color: #4682B4 !important;
308
  outline: none !important;
 
309
  }
310
+ #question-input textarea::placeholder {
311
  color: #9CA3AF !important;
312
  }
313
+
314
+ /* Kill ALL Gradio focus indicators, loading bars, underlines */
315
+ [class*="focus-indicator"], [class*="progress"], [class*="eta-bar"],
316
+ [class*="generating"], [data-testid*="status"] {
317
  display: none !important;
318
  }
319
 
320
+ /* Kill the blue underline bar specifically */
321
+ .gradio-container .border-2,
322
+ .gradio-container [class*="border-solid"],
323
+ .gradio-container .ring-1,
324
+ .gradio-container [style*="border-bottom: 2px"] {
325
  border: none !important;
326
+ ring: none !important;
 
 
327
  }
328
+
329
+ /* Chat — no bubbles, no backgrounds, tight spacing */
330
+ #chat-output [class*="message"],
331
+ #chat-output [class*="bubble"],
332
+ #chat-output [class*="row"] {
333
  background: transparent !important;
334
  border: none !important;
335
+ padding: 8px 0 !important;
336
+ }
337
+
338
+ /* Hide all buttons inside chatbot (delete, copy, share) */
339
+ #chat-output button {
340
+ display: none !important;
341
  }
342
 
343
+ /* Tighten vertical gaps */
344
+ .gap-2, .gap-3, .gap-4 {
345
+ gap: 4px !important;
346
+ }
347
 
348
  /* Accordion (Trace) — subtle */
349
+ .accordion { border-color: #E5E7EB !important; }
350
 
351
+ /* Disclaimer — small, quiet footnote */
352
+ .disclaimer-text, .disclaimer-text * {
353
  font-size: 12px !important;
354
  color: #9CA3AF !important;
355
+ line-height: 1.6 !important;
356
  }
357
  .disclaimer-text a {
358
  color: #D97706 !important;