From b70d487a92049421fe3f334d865d85df58ad720c Mon Sep 17 00:00:00 2001 From: l0ng-ai <24760907+l0ng-ai@users.noreply.github.com> Date: Tue, 27 Oct 2026 17:16:25 +0800 Subject: [PATCH] fix(ui): Don't draw a second focus box inside framed text fields The global focus ring listed input and textarea. :is() takes its most specific argument, so the rule tied with the components' own :focus-visible resets and won whenever it loaded later: the Settings search field and the agent composer showed an inner square box inside their focus frame. Text fields show focus with their frame; the ring stays on checkboxes, radios and other input controls. --- src/styles/global.css | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/styles/global.css b/src/styles/global.css index 26666bbc0..3434d5a09 100644 --- a/src/styles/global.css +++ b/src/styles/global.css @@ -1,5 +1,3 @@ -@import "@fontsource-variable/inter"; -@import "@fontsource-variable/jetbrains-mono"; @import "./tokens.css"; /* Monochrome icons default to the theme icon grey; callers override for selected / disabled. */ @@ -95,16 +93,16 @@ a:hover { } /* Focus rings mark controls only, as in IDEA: lists, trees, tables, menus, popups and other - focusable containers show focus through their selected row instead of a frame. */ + focusable containers show focus through their selected row instead of a frame. Text fields + aren't listed: their frame shows focus, and an outline here draws a second box inside it. */ :focus-visible { outline: none; } :is( button, a[href], - input, + input:is([type="checkbox"], [type="radio"], [type="range"], [type="color"], [type="file"], [type="button"], [type="submit"], [type="reset"]), select, - textarea, summary, [role="button"], [role="link"],