Canvas
--color-bgColor-default
Page background
20 个官方语义 token
共 20 种颜色
Primer 是 GitHub 的设计系统,将颜色组织为功能性原语:canvas、foreground、border、accent。每种原语又分为 default、muted、emphasis 三种角色。
引用 --fgColor-default 或 --bgColor-accent-emphasis 之类的 CSS 变量。Primer 的原语让语义在明暗主题间保持稳定。
--color-bgColor-default
Page background
--color-bgColor-inset
Recessed wells and code blocks
--color-bgColor-neutral-muted
Muted section background
--color-fgColor-default
Default text
--color-fgColor-muted
Secondary text
--color-fgColor-disabled
Placeholder text
--color-fgColor-onEmphasis
Text on emphasis backgrounds
--color-bgColor-accent-emphasis
Links, selected nav items
--color-fgColor-accent
Link text color
--color-bgColor-accent-muted
Hover states and inline backgrounds
--color-bgColor-success-emphasis
Open states and confirm buttons
--color-bgColor-attention-emphasis
Caution highlights
--color-bgColor-severe-emphasis
Urgent warnings
--color-bgColor-danger-emphasis
Closed states and destructive actions
--color-bgColor-done-emphasis
Merged / complete states
--color-bgColor-sponsors-emphasis
Sponsor hearts and buttons
--color-bgColor-neutral-emphasis
Gray buttons and counters
--color-border-default
Primary borders
--color-border-muted
Secondary borders
--color-border-emphasis
Strong contrast borders
没有匹配的颜色
数据来源: Primer · @primer/primitives 11.10.0 light