Design tokens
CSS custom properties Microsoft defines, and how much of its CSS uses themTokens defined1,387custom properties
Colors from tokens16%99 of 623
Spacing from tokens4%27 of 609
Font sizes from tokens8%13 of 172
Themes3same tokens, other values
What the 1,387 tokens hold- Colors850
- Sizes and spacing182
- Motion116
- Fonts7
- Shadows18
- Point at other tokens161
- Other values53
Grouped by value: a color, a length, a timing, a font. Main colors (first theme)- --colorNeutralForeground1#242424
- --colorNeutralForeground2#424242
- --colorNeutralForeground2BrandHover#0f6cbd
- --colorNeutralForeground2BrandPressed#115ea3
- --colorNeutralForeground3#616161
- --colorNeutralForeground4#707070
- --colorNeutralForegroundDisabled#bdbdbd
- --colorBrandForegroundLinkHover#0f548c
- --colorBrandForegroundLinkPressed#0c3b5e
- --colorBrandForeground2Pressed#0a2e4a
Spacing scale--ds-spacing-* · 9 steps
Colors written out524 color declarations skip the tokens, with 145 different values. The most common: #fff (30), #0078d4 (29) and #ffffff (13).
transparent, currentColor and inherit don't count. Old CSS that works is fine; this is a map, not a score. Tokens a build step turns into plain values (Sass variables, most CSS-in-JS) never reach the browser, so they don't show here.