The grid (rendering) ยท console.warn
Column '{colId}' {where} uses unknown variant '{token}'. Register it with config.variants (light and dark together) or use one of: {list}.
Printed by The grid (rendering), prefixed [lattice], since 1.0.1.
Warnings reference › variant:*:*
- Identifier
variant:*:*- Raised by
- The grid (rendering)
- Since
- 1.0.1
What happened
A variant token named at compile time - in a map, a when clause or directly - is neither a built-in nor registered, so it has no colours behind it and the cell falls back to the default variant. Variants are named rather than free CSS so that every colour is contrast-checked in both themes.
The fix
Register the token with config.variants, giving both the light and dark values, or use one of the built-ins listed in the message.
The smallest fix
createGrid(el, { variants: { brand: { light: { fg: '#0b3', bg: '#eff' }, dark: { fg: '#7f9', bg: '#032' } } } });
Reference
Covered in full at the API reference.