Peach: Local-first video metadata scraper and media manager.
fix(web): 主按钮照 BoardUI 的三档渐变,悬停那一层铺在伪元素上淡入
longmeidao11247f332229
diff --git a/docs/BOARD_UI.md b/docs/BOARD_UI.mdindex c0af6015e..366e173de 100644--- a/docs/BOARD_UI.md+++ b/docs/BOARD_UI.md@@ -280,22 +280,36 @@ Button 取证(2026-09-10):对照官网 `/components/button` 与保存的按下 220ms、释放 420ms,曲线为 `cubic-bezier(.4,0,.2,1)`,减少动态效果时关闭。按钮保留原动作、键盘焦点、忙态防重复与禁用语义,不写入预览配置。-纠正(2026-09-12):这一段此处记过「hover 叠层以 150ms 淡入」,同日三条证据一起推翻它。-① `/components/button` 上 10 颗 `bg-button-primary` 的 `className` 里没有任何 `hover:` 或-`active:` 类;② 真鼠标悬停(`isHovered:true`)时渐变-`linear-gradient(lab(54.1736 13.3369 -74.6839),lab(44.0605 29.0279 -86.0352))`、阴影-`rgba(0,0,0,.05) 0 1px 2px`、`filter:none`、`transform:none`、`color:#fff` 与静止逐项相同;-③ 注册表 `/r/button.json`(HTTP 200,10110 字节)只在 secondary-(`hover:bg-background-primary-hover hover:border-border-button-hover`)与 ghost-(`hover:bg-button-ghost-hover active:bg-button-ghost-active`)上声明悬停,primary 那一行只有-`bg-button-primary text-text-white shadow-xs`,上游也没有 `--color-button-primary-hover` 这个-token。上游的强调档靠 `active` 那一下的缩放和键盘焦点环。--Peach 在这一档上有主动差异:强调档的悬停换一份提亮一档的渐变-(`--board-blue-hover`,blue-400→blue-600),边和阴影不动,写法与危险档那两条相同。-用户要的是压上去看得出鼠标停在哪一颗,一排按钮里毫无反应读不出来。规则连同 token-只在 `web/board.css` 一处,错误页、登录页和首启页由 `routes_pages._board_button_rules()`-取同一份过去;判据写在 `test_the_primary_tier_has_one_face_and_one_hover`。+纠正(2026-09-12):这一段此处一度记过「上游 primary 没有悬停态」,同日取到规则原文后作废。+当时那三条证据全落在同一个盲点上——悬停那一层挂在伪元素上。① 读 `className` 看不到:悬停+不是 Tailwind 的 `hover:` 类,写在样式表里;② 真鼠标悬停读 computed 也看不到:读的是元素+自己的 `background-image`,变的是 `::before` 的 `opacity`,`getComputedStyle(el)` 不传第二个+参数就取不到那一层;③ 注册表 `/r/button.json` 的 primary 那一行确实只有+`bg-button-primary text-text-white shadow-xs`,因为三档全长在 `.bg-button-primary` 这个类里。+取证结论涉及「某个状态没有样式」时,伪元素两个都要显式读一遍再下判断。++`.bg-button-primary` 的规则原文(2026-09-12 实测):类自身 `isolation:isolate` 加+`background-image:var(--gradient-button-primary-default)`;`::before` 是 `inset:0`、+`z-index:-1`、`pointer-events:none`、`border-radius:inherit`,铺+`var(--gradient-button-primary-hover)`、`opacity:0`、`transition:opacity var(--button-transition-ms) ease`+(该 token 为 .15s),`:hover:not(:disabled):not([aria-disabled=true])::before` 把它抬到 1;+`:active` 换成 `var(--gradient-button-primary-active)` 并把那层压回 0;`:disabled` 换+`--gradient-button-primary-disabled` 且 `::before{display:none}`。三档渐变都是 180deg 两停点,+按色阶排 default `accent-500→600`、hover `400→500`、active `600→700`,实测像素+400=`#3392ff`、500=`#2b7fff`、600=`#155dfc`、700=`#1447e6`。其余 computed:`height:36px`、+`padding:8px`、`border:0px`、`border-radius:10px`、`box-shadow:rgba(0,0,0,.05) 0 1px 2px`、+`color:#fff`、`font:500 14px/20px Inter`。++Peach 照抄这一副面,包括 `::before` 的交叉淡入和 `border:0`——补一圈透明边会在+`box-sizing:border-box` 下把内容盒压掉 2px,而 `background-origin` 是 padding-box,渐变被压到+34px 再延展回 36px,色标就跟上游错开一像素。三档 token 是 `--board-blue`、`--board-blue-hover`、+`--board-blue-active`,连同规则只在 `web/board.css` 一处,错误页、登录页和首启页由+`routes_pages._board_button_rules()` 取同一份过去;判据写在+`test_the_primary_tier_has_one_face_and_crossfades_into_its_hover`。++Peach 在这一档上的主动差异有两项:`padding` 取 `8px 12px` 而不是上游的四边 `8px`,中文字比+拉丁字宽,四边等距时两侧字贴着边;上游 `active` 那一下的 0.98 缩放(`transform .42s`)没有跟,+按下换渐变已经读得出来。Checkbox 动效取证(2026-09-10):项目保存的 `board-reference/checkbox.json` 中`checkbox-glyph.tsx` 使用 16px SVG、`pathLength=1` 与 `animate-check-draw`。diff --git a/docs/reference-snapshots/boardui-pro-access-card-measured.md b/docs/reference-snapshots/boardui-pro-access-card-measured.mdindex f75d81f71..3f53c2e8d 100644--- a/docs/reference-snapshots/boardui-pro-access-card-measured.md+++ b/docs/reference-snapshots/boardui-pro-access-card-measured.md@@ -72,7 +72,7 @@ BoardUI 的 76 个组件里没有图片网格或 gallery 控件,只有 carouse| 档 | 静止 | 悬停 | 类名要点 || --- | --- | --- | --- |-| primary | 渐变 `rgb(43,127,255)`→`rgb(21,93,252)`,白字,`shadow-xs`,无边 | **逐项不变** | `bg-button-primary text-text-white shadow-xs`,没有任何 `hover:` 类 |+| primary | 渐变 `rgb(43,127,255)`→`rgb(21,93,252)`,白字,`shadow-xs`,无边 | 渐变提一档到 `rgb(51,146,255)`→`rgb(43,127,255)`,铺在 `::before` 上淡入 | `bg-button-primary text-text-white shadow-xs`,三档全长在 `.bg-button-primary` 这个类里 || ghost | 浅色底 `rgb(219,234,254)` 字 `rgb(20,71,230)`;暗色底 `rgb(28,57,142)` | 浅色 `rgb(190,219,255)`、暗色 `rgb(25,60,184)`,**全程没有边** | `hover:bg-button-ghost-hover active:bg-button-ghost-active` || secondary | 白底 + `#ebebeb` 边 + `shadow-xs` | 底 `#f7f7f7`、边 `#d4d4d4` | `hover:bg-background-primary-hover hover:border-border-button-hover` |@@ -85,27 +85,36 @@ BoardUI 的 76 个组件里没有图片网格或 gallery 控件,只有 carouse`color-mix(in srgb, lab(27.036%) 60%, transparent)`——即 60% 的 #404040,Peach 映射成的`#40404099` 是忠实的,两边算出来都只比 #262626 亮几个色阶。-### primary 没有悬停态:三条独立证据--同一天在同一页上分三条路取,结论一致。这一条被单独记下来,是因为-`docs/BOARD_UI.md` 的 Auth Card 那节此前按「hover 叠层 150ms 淡入」写过一版实现。--1. **DOM**:页面上 10 颗 `bg-button-primary` 的 `className` 里没有任何 `hover:` 或- `active:` 类。-2. **真鼠标悬停**:`isHovered:true` 时读 computed,- `linear-gradient(lab(54.1736 13.3369 -74.6839), lab(44.0605 29.0279 -86.0352))`、- `rgba(0,0,0,.05) 0 1px 2px`、`filter:none`、`transform:none`、`color:#fff`,- 与静止逐项相同。-3. **注册表**:`https://www.boardui.com/r/button.json`(HTTP 200,10110 字节)里只有两处- 悬停声明——secondary 的 `hover:bg-background-primary-hover hover:border-border-button-hover`- 与 ghost 的 `hover:bg-button-ghost-hover active:bg-button-ghost-active`;primary 那一行是- `bg-button-primary text-text-white shadow-xs`。上游的 token 表里也没有- `--color-button-primary-hover`。--强调档的反馈全在别处:`active` 那一下的 0.98 缩放(`button-press-motion`)和键盘的-`focus-visible:ring-2`。primary 的过渡只列-`background-color .15s, border-color .15s, box-shadow .15s, color .15s` 加-`transform .42s cubic-bezier(.4,0,.2,1)`。+### primary 的三档:`.bg-button-primary` 规则原文++```css+.bg-button-primary{isolation:isolate;background-image:var(--gradient-button-primary-default);position:relative}+.bg-button-primary::before{content:"";z-index:-1;pointer-events:none;border-radius:inherit;+ background-image:var(--gradient-button-primary-hover);opacity:0;+ transition:opacity var(--button-transition-ms) ease;position:absolute;inset:0}+.bg-button-primary:hover:not(:disabled):not([aria-disabled="true"])::before{opacity:1}+.bg-button-primary:active:not(:disabled):not([aria-disabled="true"]){background-image:var(--gradient-button-primary-active)}+.bg-button-primary:active:not(:disabled):not([aria-disabled="true"])::before{opacity:0}+.bg-button-primary:disabled,.bg-button-primary[aria-disabled="true"]{background-image:var(--gradient-button-primary-disabled)}+.bg-button-primary:disabled::before,.bg-button-primary[aria-disabled="true"]::before{display:none}+```++`--button-transition-ms` 是 .15s。三档渐变都是 180deg 两停点,按色阶排 default+`accent-500→600`、hover `400→500`、active `600→700`;canvas 取像素得+300=`#8ec5ff`、400=`#3392ff`、500=`#2b7fff`、600=`#155dfc`、700=`#1447e6`。+其余 computed:`height:36px`、`padding:8px`、`border:0px`、`border-radius:10px`、+`box-shadow:rgba(0,0,0,.05) 0 1px 2px`、`color:#fff`、`font:500 14px/20px Inter`、+`background-origin:padding-box`、+`transition:background-color .15s, border-color .15s, box-shadow .15s, color .15s, transform .42s`。+按下另有 0.98 缩放(`button-press-motion`),键盘是 `focus-visible:ring-2`。++**纠正(2026-09-12)**:这一节此前记的是「primary 没有悬停态:三条独立证据」,同日取到上面+这段原文后作废。三条证据全落在同一个盲点上——那一层挂在 `::before` 上:① 读 `className`+看不到,悬停不是 Tailwind 的 `hover:` 类;② 真鼠标悬停读 computed 也看不到,读的是元素自己的+`background-image`,变的是伪元素的 `opacity`,`getComputedStyle(el)` 不传第二个参数就取不到;+③ 注册表 `/r/button.json` 的 primary 那一行确实只有 `bg-button-primary text-text-white shadow-xs`,+因为三档全长在那个类的 CSS 里,注册表只列类名。结论涉及「某个状态没有样式」时,+`::before` 和 `::after` 两个都要显式读一遍再下判断。### Button Group(2026-09-12)@@ -120,12 +129,15 @@ BoardUI 的 76 个组件里没有图片网格或 gallery 控件,只有 carouse## Peach 采用与差异(Button 与 Button Group)-- 强调档全站一条规则,按下与焦点环照上游;面色写在 `web/board.css` 的+- 强调档全站一副面,三档渐变、`::before` 的交叉淡入和 `border:0` 都照上游;token 是+ `--board-blue`、`--board-blue-hover`、`--board-blue-active`,规则写在 `web/board.css` 的`body :is(…).primary:not(:disabled)`,错误页、登录页和首启页由- `routes_pages._board_button_rules()` 取同一条过去,不抄第二份色值。-- **悬停是 Peach 的主动差异**:上游的 primary 压上去逐项不变,Peach 按用户要求换一份- 提亮一档的渐变(`--board-blue-hover`,blue-400→blue-600),边和阴影不动。判据是- 一排按钮里压着的那颗要读得出来。+ `routes_pages._board_button_rules()` 取同一份过去,不抄第二份色值。+- `border:0` 不是省事:补一圈透明边在 `box-sizing:border-box` 下会把内容盒压掉 2px,而+ `background-origin` 是 padding-box,渐变被压到 34px 再延展回 36px,色标跟上游错开一像素。+- **`padding` 是 Peach 的主动差异**:取 `8px 12px` 而不是上游四边 `8px`,中文字比拉丁字宽,+ 四边等距时两侧字贴着边。上游 `active` 那一下的 0.98 缩放(`transform .42s`)没有跟,+ 按下换渐变已经读得出来。- 分体按钮的分隔线按上游的做法交给右半的 `border-left`,上下顶满;两半的悬停走 Peach 自己的`--control-hover`(浅色 #e5e5e5、暗色 #404040)而不是上游的 `background-primary-hover`,理由与次级按钮那一条相同,见上一节。diff --git a/src/peach/routes_pages.py b/src/peach/routes_pages.pyindex 74cd621c1..269db3dfe 100644--- a/src/peach/routes_pages.py+++ b/src/peach/routes_pages.py@@ -331,9 +331,9 @@ def _board_button_rules() -> str:产品。把值抄进 `board-entry.css` 也能画成一样,但那是第二份色值——站内改一次渐变,这三页就悄悄留在旧的那一版上。- 只取主按钮那三条(静止、悬停、尺寸)和它们用到的 token:`board.css` 的 `:root` 里- 还有一份把 `--page` `--ground` 按 Board 的角色重排的映射,整块搬过来会把入口页- 自己的面色对调。+ 只取主按钮那几条(静止、悬停铺的那层底、按下、尺寸)和它们用到的 token:`board.css`+ 的 `:root` 里还有一份把 `--page` `--ground` 按 Board 的角色重排的映射,整块搬过来+ 会把入口页自己的面色对调。"""board = (PROJECT_ROOT / "web/board.css").read_text(encoding="utf-8")palettes = re.findall(@@ -343,7 +343,8 @@ def _board_button_rules() -> str:fonts = [f'{name}:{value}' for name in ("--board-font", "--board-body-medium")for value in re.findall(rf'{name}:([^;]+);', board)[:1]]rules = re.findall(- r'^body :is\([^)]*\)\.primary(?::not\(:disabled\))?(?::hover)?\{[^}]*\}', board, re.M)+ r'^body :is\([^)]*\)\.primary(?::not\(:disabled\))?'+ r'(?::hover|:active)?(?:::before)?\{[^}]*\}', board, re.M)return ''.join(palettes) + ''.join(switches) + ':root{' + ';'.join(fonts) + '}' + ''.join(rules)diff --git a/tests/test_onboarding.py b/tests/test_onboarding.pyindex 57265878a..086396995 100644--- a/tests/test_onboarding.py+++ b/tests/test_onboarding.py@@ -939,10 +939,11 @@ class StandaloneConfigurationTests(_Case):# 主按钮那一颗连同它用到的 token 从 board.css 原样取:这三张页面上的强调档# 和站内是同一份规则,不是照着抄的第二份色值,站内改一次渐变这里跟着走。board_rules = _board_button_rules()- self.assertIn('.primary:not(:disabled){background:var(--board-blue);', board_rules)- self.assertIn(- '.primary:not(:disabled):hover{background:var(--board-blue-hover);color:#fff}',- board_rules)+ self.assertIn('.primary:not(:disabled){position:relative;isolation:isolate;'+ 'background:var(--board-blue);', board_rules)+ self.assertIn('.primary:not(:disabled):hover::before{opacity:1}', board_rules)+ self.assertIn('.primary:not(:disabled):active{background:var(--board-blue-active)}',+ board_rules)self.assertIn('--board-blue:linear-gradient(', board_rules)self.assertIn(board_rules, missing.text)data = client.get("/refuse", headers={"Accept": "application/json"})diff --git a/tests/test_web_ui.py b/tests/test_web_ui.pyindex 977b17788..3364f44f7 100644--- a/tests/test_web_ui.py+++ b/tests/test_web_ui.py@@ -493,7 +493,7 @@ class WebUiSourceTests(unittest.TestCase):"border:0;border-radius:var(--control-radius);""background:var(--ground);color:var(--ink);display:inline-flex;")self.assertPageContains(f".geist-button:hover:not(:disabled){{{secondary_hover}}}")- # 强调档那一面只有 `board.css` 一处(`test_the_primary_tier_has_one_face_and_one_hover`)。+ # 强调档那一面只有 `board.css` 一处(`test_the_primary_tier_has_one_face_and_crossfades_into_its_hover`)。# 这一层再写一份的话,它的 `:hover:not(:disabled)` 比 Board 那条静止规则重一个类,# 同一颗按钮的静止和悬停就分别由两处给出。self.assertNotIn(".geist-button.primary{", css)@@ -1172,7 +1172,7 @@ class WebUiSourceTests(unittest.TestCase):rule = css[start:css.index("}", start)]self.assertIn(ring, rule, f"{name} 次级档要有那一圈 1px 环")# 实心档自己的填充就是边界,再挂环会在实底外面描出第二道轮廓。强调档不在这一层:- # 它那一面连同 `box-shadow` 由 `board.css` 一处给(`test_the_primary_tier_has_one_face_and_one_hover`)。+ # 它那一面连同 `box-shadow` 由 `board.css` 一处给(`test_the_primary_tier_has_one_face_and_crossfades_into_its_hover`)。for solid in (".geist-button.error{background:#da2f35;color:#fff;box-shadow:none}",".geist-button.warning{background:#ff990a;color:#000;box-shadow:none}"):self.assertPageContains(solid, "实心档不挂环")@@ -9213,14 +9213,19 @@ class WebUiSourceTests(unittest.TestCase):# 边不动之后悬停还得剩点东西:玻璃条上的药丸提文字色。self.assertIn(".board-filter-frame.board-filter-frame .pill:hover{color:var(--ink)}", board)- def test_the_primary_tier_has_one_face_and_one_hover(self):- """强调档全站一颗:静止和悬停各一条规则,都在 board.css,悬停只提亮渐变。+ def test_the_primary_tier_has_one_face_and_crossfades_into_its_hover(self):+ """强调档全站一颗:三档渐变都在 board.css,悬停那一档铺在 `::before` 上淡入。- 悬停这一档是 Peach 的主动差异。2026-09-12 在 boardui.com/components/button- 取证:上游的 primary 没有悬停态——页面上 10 颗里没有一颗带 `hover:` 的类,注册表- `/r/button.json` 只在 secondary 和 ghost 上声明悬停,真鼠标悬停时渐变、阴影、- 滤镜、位移和字色逐项与静止相同。按用户要求补上,做法跟危险档那两条一样:换一份- 提亮一档的渐变,边和阴影不动。+ 照 `boardui.com/components/button` 的 `.bg-button-primary`(2026-09-12 实测):+ 静止 accent-500→600、悬停 400→500、按下 600→700,悬停那一层是宿主的 `::before`+ 改 opacity 交叉淡入。不直接换 `background` 是因为渐变是 background-image,它没有+ 插值可言,直接换就是硬切一下;按下那一下换回 `background` 并把那层压回 0,于是+ 悬停着按下去也是一档一档地走。++ 不带边:上游那颗是 `border:0`,补一圈透明边在 `box-sizing:border-box` 下会把内容盒+ 压掉 2px,而 `background-origin` 是 padding-box,渐变被压到 34px 再延展到 36px,+ 色标跟上游错开一像素——这就是用户看到的「偏移」。宿主要 `isolation:isolate`,+ 不然 `z-index:-1` 会把那一层送到按钮所在层叠上下文的底下,铺到卡片背面去。面色分在两层写的后果不是「多一条规则」:`web/css/` 那一层的`.geist-button.primary:hover:not(:disabled)` 是四个类,比 Board 那条静止规则@@ -9234,24 +9239,29 @@ class WebUiSourceTests(unittest.TestCase):return [rule for rule in rule_re.findall(source)if ".primary" in re.sub(r":not\([^)]*\)", "", rule.partition("{")[0])]- face = [rule for rule in primary_rules(board)- if "background:var(--board-blue)" in rule.partition("{")[2]]+ rules = primary_rules(board)+ face = [rule for rule in rules if "background:var(--board-blue)" in rule.partition("{")[2]]self.assertEqual(len(face), 1, "强调档那一面只该有一条规则")- for declaration in ("border:1px solid transparent", "color:#fff",- "box-shadow:0 1px 2px #0000000d"):+ for declaration in ("border:0", "color:#fff", "box-shadow:0 1px 2px #0000000d",+ "position:relative", "isolation:isolate"):self.assertIn(declaration, face[0])- hover = [rule for rule in primary_rules(board) if ":hover" in rule.partition("{")[0]]- self.assertEqual(len(hover), 1, "强调档的悬停也只该有一条规则")- self.assertIn("background:var(--board-blue-hover)", hover[0])- # 文字色自己写一份:靠静止那条压过更宽的通用悬停是算出来的巧合,见- # `test_a_solid_tier_hover_spells_out_its_own_text_colour`。- self.assertIn("color:#fff", hover[0])- for name in ("border", "box-shadow", "filter", "transform"):- self.assertNotIn(name, hover[0].partition("{")[2],- f"悬停只换渐变,{name} 不动")- self.assertEqual(- face[0].partition("{")[0].strip() + ":hover", hover[0].partition("{")[0].strip(),- "两条的选择器要同一份名单,否则有的按钮压上去没反应")+ for rule in rules:+ self.assertNotIn("border:1px solid transparent", rule,+ "强调档不补透明边,它会把渐变的色标挤开一像素")+ layer = [rule for rule in rules+ if "background:var(--board-blue-hover)" in rule.partition("{")[2]]+ self.assertEqual(len(layer), 1, "悬停那一层底只该铺一次")+ for declaration in ("content:\"\"", "position:absolute", "inset:0", "z-index:-1",+ "pointer-events:none", "border-radius:inherit", "opacity:0",+ "transition:opacity .15s ease"):+ self.assertIn(declaration, layer[0])+ roster = face[0].partition("{")[0].strip()+ # 四条都得挂在同一份名单上,否则有的按钮压上去没反应、有的按下去不回弹。+ self.assertEqual(layer[0].partition("{")[0].strip(), roster + "::before")+ for suffix, body in ((":hover::before", "{opacity:1}"),+ (":active", "{background:var(--board-blue-active)}"),+ (":active::before", "{opacity:0}")):+ self.assertIn(roster + suffix + body, board)for rule in primary_rules(stylesheet_source()):selector = rule.partition("{")[0].strip()self.assertNotIn(":hover", selector, f"强调档的悬停不写在这一层:{selector}")@@ -9277,13 +9287,18 @@ class WebUiSourceTests(unittest.TestCase):self.assertIn(f"--board-blue:{gradient}", rules, "入口页那份渐变要跟站内逐字相同")primary = rules[rules.index(".primary:not(:disabled){"):]primary = primary[:primary.index("}")]- for declaration in ("background:var(--board-blue)", "border:1px solid transparent",- "color:#fff", "box-shadow:0 1px 2px #0000000d"):+ for declaration in ("background:var(--board-blue)", "border:0",+ "color:#fff", "box-shadow:0 1px 2px #0000000d",+ "isolation:isolate"):self.assertIn(declaration, primary)self.assertIn("height:36px", rules, "尺寸那条也一起取过去")- self.assertIn(".primary:not(:disabled):hover{background:var(--board-blue-hover);color:#fff}",- rules, "悬停那条也要跟过去,否则这三页的按钮压上去没反应")+ # 悬停铺的是 `::before` 那层底,淡入靠改 opacity:三条少一条这三页的按钮就要么+ # 压上去没反应,要么亮着不退。+ for suffix in (".primary:not(:disabled)::before{", ".primary:not(:disabled):hover::before{",+ ".primary:not(:disabled):active{", ".primary:not(:disabled):active::before{"):+ self.assertIn(suffix, rules, "悬停和按下那几条也要跟过去")self.assertIn("--board-blue-hover:linear-gradient(", rules)+ self.assertIn("--board-blue-active:linear-gradient(", rules)def test_the_settings_drawer_column_is_the_same_glass_as_the_sidebar(self):"""设置弹层左栏和左侧抽屉是同一件事的两种形态,玻璃并在同一条规则上。diff --git a/web/board-entry.css b/web/board-entry.cssindex 450dfa121..f5e6f2789 100644--- a/web/board-entry.css+++ b/web/board-entry.css@@ -9,8 +9,11 @@ input[type=text],input[type=password],input[type=number],select,.affix{backgroun/* 主按钮那一颗不写在这里:`routes_pages._board_button_rules()` 把 `board.css` 里的Board primary 连同它用到的 token 一起内联进这三页,站内改一次渐变这里跟着走。表单里那些没带 `.geist-button primary` 的提交键还是要自己接上同一副盒子。 */-button[type=submit],form>button{height:36px;background:var(--board-blue);color:#fff;border:1px solid transparent;box-shadow:0 1px 2px #0000000d;border-radius:10px}-button[type=submit]:hover:not(:disabled),form>button:hover:not(:disabled){background:var(--board-blue-hover);color:#fff}+button[type=submit],form>button{position:relative;isolation:isolate;height:36px;background:var(--board-blue);color:#fff;border:0;box-shadow:0 1px 2px #0000000d;border-radius:10px}+button[type=submit]::before,form>button::before{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;border-radius:inherit;background:var(--board-blue-hover);opacity:0;transition:opacity .15s ease}+button[type=submit]:hover:not(:disabled)::before,form>button:hover:not(:disabled)::before{opacity:1}+button[type=submit]:active:not(:disabled),form>button:active:not(:disabled){background:var(--board-blue-active)}+button[type=submit]:active:not(:disabled)::before,form>button:active:not(:disabled)::before{opacity:0}.switch label:has(input:checked){background:var(--ground);box-shadow:0 1px 3px #0002}@media(max-width:480px){main{padding:20px}}/* Auth Card:单行登录偏好。 */@@ -107,13 +110,16 @@ main:has(.setup-auth-card){width:100%;max-width:560px;padding:32px;box-shadow:0.setup-auth-card :is(.pick,.add){background:var(--ground);border:1px solid var(--button-border);color:var(--ink)}.setup-auth-card :is(.pick,.add):hover:not(:disabled):not([aria-disabled=true]){background:var(--button-hover);border-color:var(--button-border-hover)}.setup-auth-card :is(.pick,.add):active:not(:disabled):not([aria-disabled=true]){background:var(--button-active);border-color:var(--button-border-active)}-/* 首启和登录的提交键跟错误页那颗、跟站内每一颗主按钮同一张面:静止取 `--board-blue`,- 悬停取 `--board-blue-hover`,两个 token 都由 `routes_pages._board_button_rules()` 从- `board.css` 送进来。按下那一下照旧:压深一档配 0.98 的缩放,那是上游+/* 首启和登录的提交键跟错误页那颗、跟站内每一颗主按钮同一张面:三档渐变都是+ `--board-blue` `--board-blue-hover` `--board-blue-active`,由+ `routes_pages._board_button_rules()` 从 `board.css` 送进来。悬停那一档同样铺在+ `::before` 上淡入,不直接换 `background`。按下那一下照旧配 0.98 的缩放,那是上游`button-press-motion` 那一份。 */-.setup-auth-card :is(button[type=submit],.setup-enter){border:0;color:#fff;background:var(--board-blue)}-.setup-auth-card :is(button[type=submit],.setup-enter):hover:not(:disabled):not([aria-disabled=true]){background:var(--board-blue-hover);color:#fff}-.setup-auth-card :is(button[type=submit],.setup-enter):active:not(:disabled):not([aria-disabled=true]){background:linear-gradient(180deg,lab(44.0605% 29.0279 -86.0352),lab(36.9089% 35.0961 -85.6872))}+.setup-auth-card :is(button[type=submit],.setup-enter){position:relative;isolation:isolate;border:0;color:#fff;background:var(--board-blue)}+.setup-auth-card :is(button[type=submit],.setup-enter)::before{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;border-radius:inherit;background:var(--board-blue-hover);opacity:0;transition:opacity .15s ease}+.setup-auth-card :is(button[type=submit],.setup-enter):hover:not(:disabled):not([aria-disabled=true])::before{opacity:1}+.setup-auth-card :is(button[type=submit],.setup-enter):active:not(:disabled):not([aria-disabled=true]){background:var(--board-blue-active)}+.setup-auth-card :is(button[type=submit],.setup-enter):active:not(:disabled):not([aria-disabled=true])::before{opacity:0}.setup-auth-card :is(.pick,.add,button[type=submit],.setup-enter):active:not(:disabled):not([aria-disabled=true]){transform:scale(.98);transition-duration:.15s,.15s,.15s,.15s,.22s}.setup-auth-card :is(.pick,.add,button[type=submit],.setup-enter):is(:disabled,[aria-disabled=true]){cursor:not-allowed;color:var(--muted);box-shadow:none;transform:none;background:var(--surface);border-color:var(--button-border)}.setup-auth-card :is(button[type=submit],.setup-enter):is(:disabled,[aria-disabled=true]){background:var(--button-disabled)}diff --git a/web/board.css b/web/board.cssindex 61f9262d5..3f101f953 100644--- a/web/board.css+++ b/web/board.css@@ -375,7 +375,7 @@ body.board-scrolled .top{box-shadow:none;border-bottom:0}.board-filter-frame .tagbar.is-stuck,.board-filter-frame .count.is-stuck{backdrop-filter:none;-webkit-backdrop-filter:none}.peach-insights{max-width:1120px;margin:0 auto 40px;color:var(--ink)}.peach-insights[hidden]{display:none}-:root,[data-theme="light"]{--page:#f7f7f7;--ground:#fff;--surface:#fafafa;--sunk:#f2f2f2;--ink:#171717;--ink-2:#525252;--muted:#737373;--line:#e5e5e5;--line-soft:#ebebeb;--inset:#f0f0f0;--picked:#f0f0f0;--tungsten:#3b82f6;--control-radius:10px;--surface-radius:14px;--floating-radius:20px;--railW:272px;--board-blue:linear-gradient(180deg,#3b82f6,#2563eb)}+:root,[data-theme="light"]{--page:#f7f7f7;--ground:#fff;--surface:#fafafa;--sunk:#f2f2f2;--ink:#171717;--ink-2:#525252;--muted:#737373;--line:#e5e5e5;--line-soft:#ebebeb;--inset:#f0f0f0;--picked:#f0f0f0;--tungsten:#3b82f6;--control-radius:10px;--surface-radius:14px;--floating-radius:20px;--railW:272px}[data-theme="dark"]{--page:#111;--ground:#1c1c1c;--surface:#232323;--sunk:#171717;--ink:#fafafa;--ink-2:#d4d4d4;--muted:#a3a3a3;--line:#383838;--line-soft:#303030;--inset:#303030;--picked:#303030;--hover:rgba(255,255,255,.07)}body{background:var(--page)}.top{background:var(--page);backdrop-filter:none;border-bottom:0;height:64px}@@ -926,7 +926,7 @@ html.board-high-contrast .settingscard.settingscard>.board-local-nav{background:@media(max-width:760px){body #manageTitle{width:100%}.board-watch-entry,.board-source-list,.tasteleads .insightpanelbody,.tasteranks,.tasteranks-tags,.tasteranks-visual,.tastesources .insightpanelbody>div{grid-template-columns:minmax(0,1fr)}.board-watch-entry{gap:8px}.tasteleads>header{padding:20px 16px 12px}.tasteleads .insightpanelbody{padding:8px 16px 20px}.followmanage .fmain>.fsec:has(.fcred)>.frows{grid-template-columns:minmax(0,1fr)}.followmanage .fauthor{padding:16px}.followmanage .fsechead{gap:8px}.followmanage .fmanagesort{margin-left:0}}/* Board 的语义色与复合字阶;图表和业务状态独立于交互强调色。 */-:root,:root[data-theme="light"]{--color-text-primary:#0a0a0a;--color-text-secondary:#737373;--color-text-tertiary:#a3a3a3;--color-background-full:#fff;--color-background-primary-default:#fff;--color-background-primary-hover:#f5f5f5;--color-background-secondary-default:#f5f5f5;--color-background-tertiary-default:#e5e5e5;--color-border-button-default:#e5e5e5;--color-border-button-hover:#d4d4d4;--color-border-button-active:#a3a3a3;--color-separator-border:#e5e5e5;--color-border-focus-ring:#3b82f6;--color-text-white:#fff;--color-text-disabled:#d4d4d4;--board-blue:linear-gradient(180deg,#3b82f6,#155dfc);--board-blue-hover:linear-gradient(180deg,#60a5fa,#2563eb)}+:root,:root[data-theme="light"]{--color-text-primary:#0a0a0a;--color-text-secondary:#737373;--color-text-tertiary:#a3a3a3;--color-background-full:#fff;--color-background-primary-default:#fff;--color-background-primary-hover:#f5f5f5;--color-background-secondary-default:#f5f5f5;--color-background-tertiary-default:#e5e5e5;--color-border-button-default:#e5e5e5;--color-border-button-hover:#d4d4d4;--color-border-button-active:#a3a3a3;--color-separator-border:#e5e5e5;--color-border-focus-ring:#3b82f6;--color-text-white:#fff;--color-text-disabled:#d4d4d4;--board-blue:linear-gradient(180deg,#2b7fff,#155dfc);--board-blue-hover:linear-gradient(180deg,#3392ff,#2b7fff);--board-blue-active:linear-gradient(180deg,#155dfc,#1447e6)}:root[data-theme="dark"]{--color-text-primary:#fafafa;--color-text-secondary:#737373;--color-text-tertiary:#525252;--color-background-full:#121212;--color-background-primary-default:#262626;--color-background-primary-hover:#40404099;--color-background-secondary-default:#171717;--color-background-tertiary-default:#262626;--color-border-button-default:#404040;--color-border-button-hover:#737373;--color-border-button-active:#525252;--color-separator-border:#262626;--color-text-disabled:#262626}@media(prefers-color-scheme:dark){:root:not([data-theme]){--color-text-primary:#fafafa;--color-text-secondary:#a3a3a3;--color-text-tertiary:#737373;--color-background-full:#121212;--color-background-primary-default:#262626;--color-background-primary-hover:#40404099;--color-background-secondary-default:#171717;--color-background-tertiary-default:#262626;--color-border-button-default:#404040;--color-border-button-hover:#737373;--color-border-button-active:#525252;--color-separator-border:#262626;--color-text-disabled:#525252}}:root{--page:var(--color-background-full);--ground:var(--color-background-secondary-default);--surface:var(--color-background-primary-default);--sunk:var(--color-background-secondary-default);--ink:var(--color-text-primary);--ink-2:var(--color-text-secondary);--muted:var(--color-text-secondary);--line:var(--color-border-button-default);--line-soft:var(--color-separator-border);--picked:var(--color-background-tertiary-default);--inset:var(--color-background-tertiary-default);--hover:var(--color-background-primary-hover);--tungsten:var(--color-border-focus-ring);--chart-0:#2dd4bf;--chart-1:#a3e635;--chart-2:#f472b6;--chart-3:#38bdf8;--board-font:'Inter Variable','Inter','Segoe UI','Microsoft YaHei UI','PingFang SC',sans-serif;--board-body:400 14px/20px var(--board-font);--board-body-medium:500 14px/20px var(--board-font);--board-compact:400 13px/18px var(--board-font);--board-caption:400 12px/16px var(--board-font);--board-heading:500 20px/26px var(--board-font);--board-title:500 32px/44px var(--board-font);--board-figure:500 24px/34px var(--board-font)}@@ -978,13 +978,19 @@ body .pill:hover,body .brandpill:hover{border-color:var(--field-ring)}body .index .index-tags .tg:hover{border-color:color-mix(in srgb,var(--tag-color) 32%,transparent)}body .entitylinks a:hover{border-color:var(--line)}body :is(.geist-button,.fbtn,.resourceaction,.fcredactions button,.fpickactions button,.batchbar button,.reviewpickhead button,.tagselection button):not(.primary,.danger,.error,.warning):is(:disabled,[aria-disabled=true]){background:var(--ground);border-color:var(--line);color:var(--muted);box-shadow:none}-/* 强调档全站一副面:渐变、透明边、shadow-xs、白字,尺寸归下面那条。压上去把渐变提亮- 一档(blue-400→blue-600),边和阴影一动不动——跟危险档那两条是同一个写法。这一档是- Peach 的主动差异:2026-09-12 在 boardui.com/components/button 实测,上游的 primary- 没有悬停态(10 颗里没有一颗带 `hover:` 的类,注册表只在 secondary 和 ghost 上声明- 悬停),但一排按钮里压着的那颗毫无反应,鼠标停在哪颗就读不出来。 */-body :is(.geist-button,.fbtn,.resourceaction,.tagselection button,.reviewactions button,.fcredactions button,.fpickactions button).primary:not(:disabled){background:var(--board-blue);border:1px solid transparent;color:#fff;box-shadow:0 1px 2px #0000000d;transition:background-color .15s ease,border-color .15s ease,box-shadow .15s ease,color .15s ease}-body :is(.geist-button,.fbtn,.resourceaction,.tagselection button,.reviewactions button,.fcredactions button,.fpickactions button).primary:not(:disabled):hover{background:var(--board-blue-hover);color:#fff}+/* 强调档全站一副面,三档渐变各差一个色阶,照 `boardui.com/components/button` 的+ `.bg-button-primary`(2026-09-12 实测):静止 accent-500→600、悬停 400→500、按下+ 600→700。不带边——上游那颗是 `border:0`,这里补一圈透明边会把内容盒压掉 2px,渐变的+ 色标跟着错开一像素。+ 悬停那一档铺在 `::before` 上淡入,不直接换 `background`:渐变是 background-image,+ 它没有插值可言,直接换就是硬切一下。两层交叠着改 opacity 才过渡得起来,这也是上游+ 那一份的做法。宿主要 `isolation:isolate`,不然 `z-index:-1` 会把它送到按钮所在层叠+ 上下文的底下,铺到卡片背面去。 */+body :is(.geist-button,.fbtn,.resourceaction,.tagselection button,.reviewactions button,.fcredactions button,.fpickactions button).primary:not(:disabled){position:relative;isolation:isolate;background:var(--board-blue);border:0;color:#fff;box-shadow:0 1px 2px #0000000d;transition:box-shadow .15s ease,color .15s ease}+body :is(.geist-button,.fbtn,.resourceaction,.tagselection button,.reviewactions button,.fcredactions button,.fpickactions button).primary:not(:disabled)::before{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;border-radius:inherit;background:var(--board-blue-hover);opacity:0;transition:opacity .15s ease}+body :is(.geist-button,.fbtn,.resourceaction,.tagselection button,.reviewactions button,.fcredactions button,.fpickactions button).primary:not(:disabled):hover::before{opacity:1}+body :is(.geist-button,.fbtn,.resourceaction,.tagselection button,.reviewactions button,.fcredactions button,.fpickactions button).primary:not(:disabled):active{background:var(--board-blue-active)}+body :is(.geist-button,.fbtn,.resourceaction,.tagselection button,.reviewactions button,.fcredactions button,.fpickactions button).primary:not(:disabled):active::before{opacity:0}body button.danger:not(.frowicon):not(:disabled){background:linear-gradient(180deg,#ff3347,#e60012);border:1px solid transparent;color:#fff;box-shadow:0 1px 2px #0000000d;transition:filter .15s ease}body button.danger:not(.frowicon):hover:not(:disabled){background:linear-gradient(180deg,#ff6471,#ff3347);filter:none;color:#fff}.followmanage .fbtn.fmanagedir{width:36px;padding:0}.followmanage .faliasform :is(input,.fbtn){height:36px;min-height:36px}.followmanage .frowicon{width:32px;height:32px;border:1px solid var(--line);border-radius:8px;background:var(--surface);box-shadow:0 1px 2px #0000000d}