From 272a0931a1ba4a539c2dd889796dfd3caffbec0d Mon Sep 17 00:00:00 2001 From: Jz0ojiang Date: Tue, 11 Aug 2026 17:03:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E6=9C=AC=E8=BE=93=E5=85=A5=E7=9A=84?= =?UTF-8?q?=E7=84=A6=E7=82=B9=E6=80=81=E7=BB=9F=E4=B8=80=E6=88=90=E6=8F=8F?= =?UTF-8?q?=E8=BE=B9=E5=8F=98=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 原来三个组件各写一份、筛选输入框哪份都没有,落到全局的外圈 outline, 和订阅选择器长得不一样。规则上收到 tokens.css 一处,组件里的重复定义 删掉。按钮保留外圈焦点环,那是键盘可达性。 --- web/components/SourcePicker.vue | 6 ------ web/styles/tokens.css | 8 ++++++++ web/views/InboundForm.vue | 6 ------ web/views/TokenGate.vue | 5 ----- 4 files changed, 8 insertions(+), 17 deletions(-) diff --git a/web/components/SourcePicker.vue b/web/components/SourcePicker.vue index b1e14e8..ef978dd 100644 --- a/web/components/SourcePicker.vue +++ b/web/components/SourcePicker.vue @@ -175,12 +175,6 @@ function onFocusOut(event: FocusEvent) { font-size: var(--t-sm); } -/* 焦点态由整个框的描边表达,框里的输入不再自己画一圈 */ -.box input:focus, -.box input:focus-visible { - outline: none; -} - /* 浮在上面,不能把下面几行顶下去 */ .menu { position: absolute; diff --git a/web/styles/tokens.css b/web/styles/tokens.css index 05bd77b..ea89a2f 100644 --- a/web/styles/tokens.css +++ b/web/styles/tokens.css @@ -150,6 +150,14 @@ kbd, outline-offset: 2px; } +/* 文本输入的焦点态统一为描边变色,不叠外圈(订阅选择器的形态)。按钮保留外圈,那是键盘可达性 */ +input:focus-visible, +select:focus-visible, +textarea:focus-visible { + outline: none; + border-color: var(--c-accent); +} + /* 交互控件的颜色过渡。只过渡颜色类属性,不碰布局;时长以「感知得到但不等待」为准 */ button, input, diff --git a/web/views/InboundForm.vue b/web/views/InboundForm.vue index 4210318..b7b57ef 100644 --- a/web/views/InboundForm.vue +++ b/web/views/InboundForm.vue @@ -280,12 +280,6 @@ select { background-position: right var(--s-3) center; } -input:focus, -select:focus { - border-color: var(--c-accent); - outline: none; -} - .note { font-size: var(--t-xs); color: var(--c-text-faint); diff --git a/web/views/TokenGate.vue b/web/views/TokenGate.vue index 1a0d216..1df866c 100644 --- a/web/views/TokenGate.vue +++ b/web/views/TokenGate.vue @@ -62,11 +62,6 @@ h1 { background: var(--c-surface); } -.field:focus { - border-color: var(--c-accent); - outline: none; -} - .go { padding: var(--s-3) var(--s-4); border: 1px solid transparent;