refactor: SitePage/SiteSidebar 样式迁 vanilla-extract #71

Merged
arnold.cui merged 1 commits from refactor/site-shell-ve into main 2026-11-29 09:45:22 +00:00
Member

背景承接 #62 之后的「样式按层级归位、去 tailwind」路线:页面壳(SitePage/SiteFooter)与侧栏(SiteSidebar)仍以 tailwind 工具类为主。本次把两者迁入组件旁共置的 vanilla-extract css.ts,与 chapterTicket / entryGuide 等组件的既有模式对齐。原 #70 因携带已被 #67 取代的组件迁包方案关闭;本 PR 只含壳层样式迁移这一件事,基于当前 main 重做。## 变更内容- 新增 sitePage.css.ts:SitePage/SiteFooter 壳层样式全量 ve 化——shell 断点(1200px/2xl 1600px)、sidebar 与无 sidebar 两种页型、标题系、页脚、navSticky/footerWrap 等;- 新增 siteSidebar.css.ts:触发器与 burger、抽屉/遮罩(含 peer-checked 开合、reduced-motion 降级)、行组分隔线、条目 chips、选中 inset 全量 ve 化;纯 CSS checkbox 开合改为 toggleInput:checked ~ & 选择器表达;- SitePage.tsx / SiteSidebar.tsx 的 className 改引对应 css.ts 导出;DOM 结构、无障碍属性与 biome-ignore 指令原样保留。## 自测结果- yarn workspace @idealjs/stack-site-ui-kit typecheck、apps/tutorial 下 tsc -b 通过;- yarn biome check(4 个改动文件)通过;node scripts/strip-comments.mjs 0 清除;- e2e:全量 159 通过,其中 28 张整页/移动端视觉基线(0.1% 容差)原样通过——迁移前后像素等价;- CI:CI / check (pull_request) ✓(run 710)。前后对照截图(before = main@b80afe9,after = 本分支),每组上 before 下 after:index · 桌面 1280×900before · index 桌面after · index 桌面practice(sidebar 页型)· 桌面 1280×900before · practice 桌面after · practice 桌面index · 移动 390×844before · index 移动after · index 移动practice · 移动 390×844before · practice 移动after · practice 移动

## 背景承接 #62 之后的「样式按层级归位、去 tailwind」路线:页面壳(SitePage/SiteFooter)与侧栏(SiteSidebar)仍以 tailwind 工具类为主。本次把两者迁入组件旁共置的 vanilla-extract css.ts,与 chapterTicket / entryGuide 等组件的既有模式对齐。原 #70 因携带已被 #67 取代的组件迁包方案关闭;本 PR 只含壳层样式迁移这一件事,基于当前 main 重做。## 变更内容- 新增 `sitePage.css.ts`:SitePage/SiteFooter 壳层样式全量 ve 化——shell 断点(1200px/2xl 1600px)、sidebar 与无 sidebar 两种页型、标题系、页脚、navSticky/footerWrap 等;- 新增 `siteSidebar.css.ts`:触发器与 burger、抽屉/遮罩(含 peer-checked 开合、reduced-motion 降级)、行组分隔线、条目 chips、选中 inset 全量 ve 化;纯 CSS checkbox 开合改为 `toggleInput:checked ~ &` 选择器表达;- `SitePage.tsx` / `SiteSidebar.tsx` 的 className 改引对应 css.ts 导出;DOM 结构、无障碍属性与 biome-ignore 指令原样保留。## 自测结果- `yarn workspace @idealjs/stack-site-ui-kit typecheck`、`apps/tutorial` 下 `tsc -b` 通过;- `yarn biome check`(4 个改动文件)通过;`node scripts/strip-comments.mjs` 0 清除;- e2e:**全量 159 通过**,其中 28 张整页/移动端视觉基线(0.1% 容差)原样通过——迁移前后像素等价;- CI:CI / check (pull_request) ✓(run 710)。前后对照截图(before = main@b80afe9,after = 本分支),每组上 before 下 after:**index · 桌面 1280×900**![before · index 桌面](https://gitea.idealjs.com/attachments/ab97fe0c-f34e-4aa2-ad21-d29530afe6e9)![after · index 桌面](https://gitea.idealjs.com/attachments/261ee09f-89f9-40cc-9ca6-0c8488592213)**practice(sidebar 页型)· 桌面 1280×900**![before · practice 桌面](https://gitea.idealjs.com/attachments/51a6cbd4-301e-4353-b0f8-f43fa3bd7ee4)![after · practice 桌面](https://gitea.idealjs.com/attachments/dd2d898d-60e7-46be-a7d4-f7c1dc9b5972)**index · 移动 390×844**![before · index 移动](https://gitea.idealjs.com/attachments/88b65dbb-e2f4-4e8e-b62a-ea87b080a7ad)![after · index 移动](https://gitea.idealjs.com/attachments/ced941fb-820c-403c-8d16-6a125fa69048)**practice · 移动 390×844**![before · practice 移动](https://gitea.idealjs.com/attachments/4c6b8310-6b51-457a-9c26-67721e549662)![after · practice 移动](https://gitea.idealjs.com/attachments/765e86d4-cad3-472a-8d66-4e439d67a930)
arnold.cui-agent added 1 commit 2026-11-29 09:34:58 +00:00
refactor: SitePage/SiteSidebar 样式迁 vanilla-extract
CI / check (pull_request) Successful in 3m10s
5ac38a633f
页面壳(SitePage/SiteFooter)与侧栏(SiteSidebar)的 tailwind 工具类迁入
组件旁共置的 sitePage.css.ts / siteSidebar.css.ts,与其余组件的既有模式
对齐。DOM 结构、无障碍属性不变,像素等价由 28 张整页/移动端视觉基线与
全量 159 条 e2e 验证。
arnold.cui merged commit d5a44a61d3 into main 2026-11-29 09:45:22 +00:00
arnold.cui deleted branch refactor/site-shell-ve 2026-11-29 09:45:22 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: idealjs/stack#71