feat(webui): refine appearance and add custom reading sizes
This commit is contained in:
1 parent
b048cf44f7
commit
ef8271b2c0
38 files changed
+1148
-213
No files matched your search
+1
-1
@@ -59,7 +59,7 @@ Prompt navigation retains at most three server pages. Static ready Blocks appear
|
||||
|
||||
Use the text roles in `tailwind.config.js` for shared metrics: `text-ui` for navigation, `text-control-label` for controls, `text-ui-label` for compact labels, `text-caption` for auxiliary text, and `text-title` / `text-ui-heading` for interface headings. These roles stay independent of reading preferences. Register new size utilities in `src/lib/utils.ts` so `cn()` distinguishes them from text colors.
|
||||
|
||||
`text-reading` and `.markdown-content` own reading typography; Markdown headings retain relative sizes, and tables, inline code and fenced code preserve their own hierarchy. Browser preferences select small / standard / large body sizes of 16 / 18 / 20px on desktop and 15 / 16 / 18px below 640px. Latin body line height is 1.625; Chinese, Japanese and Korean retain 1.8. `text-code` and `text-code-dense` share the mono stack and scale to 0.875 and 0.75 of body size. Avoid local font-size or line-height overrides for these roles.
|
||||
`text-reading` and `.markdown-content` own reading typography; Markdown headings retain relative sizes, and tables, inline code and fenced code preserve their own hierarchy. Browser preferences select small / standard / large body sizes of 16 / 18 / 20px on desktop and 15 / 16 / 18px below 640px. Custom reading sizes use a persisted integer from 14 to 28px on both viewport sizes; switching presets preserves the custom value. The `.reading-typography` scope lets the Appearance live preview use the same tokens with its caller-owned preferences. Latin body line height is 1.625; Chinese, Japanese and Korean retain 1.8. `text-code` and `text-code-dense` share the mono stack and scale to 0.875 and 0.75 of body size. Avoid local font-size or line-height overrides for these roles.
|
||||
|
||||
The Composer shares `text-composer` between its textarea and mention overlay, with a 16px minimum and 1.5 line height. Preserve identical text metrics, padding and literal CJK/Latin spacing in both layers. Reading preferences are projected by `useReadingTypography` through document tokens, without changing the root font size, the rem spacing grid or browser zoom.
|
||||
|
||||
|
||||
Reference in new issue
Block a user