feat(layout): OPEN-02a 内缩白浮条落地(px 令牌 + 195 张基线重采)
导航由全宽贴顶条改为内缩白浮条:top 48 / 高 64,左右对齐 container-x 的 gutter。 值走 px 令牌(--header-inset-top / --header-height),避免根字号 16/17/18px 导致 rem 漂移。 契约变化:新增 data-header-state="top|scrolled" 与浮条测试锚点;外壳仍 top-0, chrome-persistence 既有的「滚动后 top===0」断言保持不变,另加浮条 rect(48/64)断言; 移动抽屉起点改 calc(inset + height)。 基线:ADR-0012 预测 180 张,实测 195 张(32 页 × 5 + 主题首页 10 + 页头 5 + 元素级 20), 逐项归因后以 --update-snapshots=changed 写入;独立只读复跑 225 passed / 0 failed / EXIT=0(9.0 分钟)。 门禁:type-check / check:grammar 21/21 / check:motion / check:a11y 全绿,lint 0 error / 88 warning, test:unit 159 套件 / 1883 例,导航三 spec 52 passed / 8 skipped(skip 均既有条件)。 OPEN-02a 关闭;OPEN-02b(滚动收方汉堡)维持不做。
This commit is contained in:
1 parent
f41c57d638
commit
353fbde8da
201 files changed
+237
-30
No files matched your search
@@ -15,7 +15,7 @@ export default function MarketingLayout({
|
||||
<ErrorBoundary>
|
||||
{/* 单一 main 原则:全局 <main id="main-content">(ClientLayout)是唯一 landmark,
|
||||
此处仅是布局容器,不得再声明 role="main"(2026-09-19 polish 收敛三重 main)。 */}
|
||||
<div className="flex-1 pt-16">
|
||||
<div className="flex-1 pt-[calc(var(--header-inset-top)+var(--header-height))]">
|
||||
{children}
|
||||
</div>
|
||||
</ErrorBoundary>
|
||||
|
||||
@@ -348,6 +348,16 @@ body {
|
||||
--container-max: 1360px;
|
||||
--container-padding: 1rem;
|
||||
|
||||
/* === 页头「内缩白浮条」的几何真源(ADR-0012 §4,2026-11-26)===
|
||||
**必须用 px,不能用 rem 档**:本仓根字号随断点变 16/17/18px,
|
||||
`top-12`(3rem) 会得到 48/51/54 三个值,`h-16`(4rem) 得到 64/68/72 ——
|
||||
而对标实测是固定的 top 48 / 高 64(ADR-0009 实测表「导航」行)。
|
||||
同 R1「rem 圆角随断点漂移」的纪律(scripts/check-visual-grammar.mjs R1)。
|
||||
消费方:`src/components/layout/header.tsx`(浮条本体)、
|
||||
`src/app/(marketing)/layout.tsx`(内容让位)、`header.tsx` 的移动抽屉(面板起点)。 */
|
||||
--header-inset-top: 48px;
|
||||
--header-height: 64px;
|
||||
|
||||
/* === 影像比例真源(2026-11-02 对标实测)===
|
||||
Porsche Consulting 中国站首页逐个 <img> getBoundingClientRect 量出的**只有四种**比例,
|
||||
且每种绑定一个明确的构图角色(不是随手裁的):
|
||||
|
||||
Reference in new issue
Block a user