Design tokens
Color, type, spacing and shadow tokens.
Token model
@tennantite/tokens declares CSS variables through Tailwind v4’s @theme and generates matching utilities. GUI scale is controlled by --mc-scale:
@theme {
--mc-scale: 2;
--mc-gui: calc(var(--mc-scale) * 1px);
--spacing: var(--mc-gui);
}
So w-20 is 20 GUI px, or 40 CSS px by default; p-4 is 8 CSS px rather than 16.
Color
There are 35 --color-mc-* tokens. Values are sampled from Minecraft Java 26.3 GUI colors. The table is derived from packages/tokens/css/tokens.css.
| Token | Value | Usage |
|---|---|---|
| --color-mc-panel | #c6c6c6 | Panel fill |
| --color-mc-panel-overlay | rgb(0 0 0 / 75%) | Title screen / tab overlay |
| --color-mc-highlight | #ffffff | Raised highlight |
| --color-mc-stone | #8b8b8b | Slot fill |
| --color-mc-stone-dark | #555555 | Panel dark edge |
| --color-mc-stone-darker | #373737 | Slot dark edge |
| --color-mc-button | #6f6f6f | Button fill |
| --color-mc-button-hover | #757575 | — |
| --color-mc-button-disabled | #2c2c2c | — |
| --color-mc-button-light | #aaaaaa | Button light edge |
| --color-mc-button-dark | #565656 | Button dark edge |
| --color-mc-slot | #8b8b8b | — |
| --color-mc-text-main | #ffffff | — |
| --color-mc-text-dim | #a0a0a0 | — |
| --color-mc-text-disabled | #a0a0a0 | — |
| --color-mc-gold | #ffaa00 | — |
| --color-mc-yellow | #ffff55 | — |
| --color-mc-green | #55ff55 | — |
| --color-mc-aqua | #55ffff | — |
| --color-mc-red | #ff5555 | — |
| --color-mc-purple | #ff55ff | — |
| --color-mc-gray | #aaaaaa | — |
| --color-mc-accent-green | #7ec850 | Primary action button (non-vanilla extension) |
| --color-mc-heart | #ff1313 | — |
| --color-mc-xp | #80ff20 | — |
| --color-mc-selection | #d5e8d0 | Hotbar selection highlight |
| --color-mc-selection-mid | #a1b29d | — |
| --color-mc-selection-dark | #5f6d5c | — |
| --color-mc-hotbar | rgb(39 37 5 / 73%) | — |
| --color-mc-scroller | #c0c0c0 | — |
| --color-mc-scroller-dark | #808080 | — |
| --color-mc-tooltip-bg | rgb(16 0 16 / 94%) | — |
| --color-mc-tooltip-text | #ffffff | — |
| --color-mc-tooltip-border-top | rgb(80 0 255 / 31%) | — |
| --color-mc-tooltip-border-bottom | rgb(40 0 127 / 31%) | — |
Type
--font-mc: Minecraft pixel font first, withMicrosoft YaHei/PingFang SCfallbacks.--text-mc: 9 GUI px font size and line height.mc-text: use it together with a color class.tailwind-mergetreatstext-mcandtext-mc-text-mainas the same group and drops the size;mc-textavoids thetext-*group.mc-text-shadow: classic 1 GUI px text shadow.
<p className="font-mc mc-text text-mc-text-main mc-text-shadow">Title</p>
Spacing and shadows
| Utility | Meaning |
|---|---|
p-8 / p-16 |
16px / 32px |
w-200 |
400px (vanilla button width) |
shadow-mc-1 / shadow-mc-2 |
1 / 2 GUI px outer shadow |
shadow-mc-raised / shadow-mc-sunken |
inset raised / sunken shadow |
mc-border / mc-border-2 |
1 / 2 GUI px border |
pixelated |
image-rendering: pixelated |
Overrides
Declare the same @theme variables after importing tokens:
@theme {
--color-mc-panel: #d9c7a3;
--color-mc-gold: #ffd166;
--mc-scale: 3;
}
--mc-gui recomputes from --mc-scale, so every gui() and --spacing measurement scales with it. See Theming.