From 7f4aeb54e2e943e1e2947d16f27b36e362b9436c Mon Sep 17 00:00:00 2001 From: shinalok Date: Tue, 2 Jun 2026 19:01:34 +0900 Subject: [PATCH] fix: suppress .generating blue border during Gradio streaming Root cause: Gradio adds .generating class to .wrap elements during streaming, which applies 2px solid blue border via theme CSS. Fix: .wrap.generating { border-color: primary; border-width: 1px } Verified: 0 blue borders on wrap elements after message send. Co-Authored-By: Claude Sonnet 4.6 --- app.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/app.py b/app.py index b36ff96..1d7dec9 100644 --- a/app.py +++ b/app.py @@ -463,17 +463,22 @@ _JS = """ _CUSTOM_CSS = """ footer { display: none !important; } -/* Gradio .wrap:focus-within 전역 제거 (모든 컴포넌트 파란 테두리 원인) */ +/* 스트리밍 중 파란 테두리 제거 (.generating 클래스가 원인) */ +.wrap.generating { + border-color: var(--border-color-primary) !important; + border-width: 1px !important; +} +/* focus-within 전역 제거 */ .wrap:focus-within { box-shadow: none !important; border-color: var(--border-color-primary) !important; } -/* pill-input wrap에만 포커스 스타일 복원 */ +/* pill-input에만 포커스 스타일 복원 */ .pill-input .wrap:focus-within { border-color: #3b82f6 !important; box-shadow: 0 0 0 3px rgba(59,130,246,.10) !important; } -/* block, container 레벨 focus-within도 제거 */ +/* block 레벨 focus 제거 */ .gradio-container .block:focus-within, .gradio-container .block:focus { box-shadow: none !important;