refactor(design-tokens): move @theme declarations to individual token files

Consolidate the design system registration by removing the centralized
`@theme inline` block and all design token imports from globals.css.
Each token file now declares its own `@theme` rules directly, allowing
Tailwind 4 to auto-collect them and generate utility classes (e.g.
`bg-accent`, `p-md`, `rounded-lg`) without redundant re-mapping.

This simplifies globals.css, removes a layer of indirection, and keeps
the design token definitions co-located with their `@theme` exposure.
This commit is contained in:
2026-06-09 16:28:06 +08:00
parent e2f60bc4f2
commit 763bec4e74
12 changed files with 117 additions and 251 deletions
+35
View File
@@ -0,0 +1,35 @@
/**
* 固定尺寸 token
* 原始 Dart: lib/design/app_dimensions.dart
*
* 注:这些是不应通过 Tailwind 缩放变化的硬尺寸(如按钮高度、对话框宽度)
*/
:root {
/* 按钮 */
--button-height: 48px;
--button-height-lg: 56px;
/* Splash Facebook 登录按钮 */
--splash-facebook-button-height: 56px;
--splash-facebook-button-radius: 28px;
/* PWA 按钮 */
--pwa-button-height: 44px;
/* 对话框 */
--dialog-max-width: 360px;
--pwa-install-dialog-max-width: 360px;
--pwa-install-container-size: 64px;
/* 列表项 */
--item-height: 56px;
/* 消息气泡 */
--bubble-min-width: 60px;
--bubble-max-width: 280px;
--bubble-min-height: 36px;
/* 聊天媒体 */
--chat-media-max-width: 240px;
--chat-media-max-height: 240px;
}