Size every icon on TDesign's scale: four rem tokens, whole pixels
TDesign draws its glyphs on a 24px grid with a 2px stroke and sizes a component's icon 2px above its text, in whole pixels. The templates had drifted to 12 one-off sizes, most of them fractional (0.9rem = 14.4px), so strokes blurred and neighbours never matched: the tab bar's 14.4px cog beside a 12.8px +, the shortcut rows' 12px + beside an 11.2px reset and 9.6px chip x. Every <ng-icon> now takes one of --icon-size-sm (14px: beside 11-12px text, small icon buttons), -md (16px: file rows, window titles, path-bar buttons), -lg (20px) or -xl (24px: lone spinners and status marks). --action-icon goes; architecture.md and gotchas.md carry the rule. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -76,6 +76,12 @@ touching the adjacent code.
|
||||
moment the pseudo-element is styled, WKWebView draws classic always-visible
|
||||
scrollbars that take layout width. Deliberate here (square design); don't
|
||||
reach for it to "tint" scrollbars without accepting that.
|
||||
- **An icon size is one of the four `--icon-size-*` tokens, never a one-off
|
||||
rem.** TDesign glyphs are 24-unit SVGs with 2-unit strokes, so a fractional
|
||||
size (0.9rem = 14.4px) lands every stroke between device pixels and blurs
|
||||
it. Per-template picks had drifted to 12 sizes, and neighbours stopped
|
||||
matching: a 14.4px cog beside a 12.8px +, and a 12px + beside 9.6px × in
|
||||
the shortcut chips.
|
||||
|
||||
## The interface scale (root font-size lever)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user