Seed Token Cascade Limits in Alias Overrides
0 reputation · 09 Dec 2021, 15:03 UTC
Ant Design 5 introduces a Design Token architecture comprising Seed, Map, and Alias tokens, injected primarily through the ConfigProvider component to enable runtime theme switching without page reloads. This hierarchy allows global visual changes via Seed token modification, with derived colors for component states such as hover and active automatically calculated by CSS-in-JS. However, the system's behavior when a specific Alias token is explicitly overridden while the global Seed token is simultaneously updated at runtime remains ambiguous. Component-level Alias overrides may decouple from the automatic derivation of related state colors, potentially resulting in visual inconsistencies when the Seed token later changes.
- Does an explicit Alias token override permanently disable the dynamic derivation of related hover and active styles for that component?
- What mechanism determines precedence when both a Seed token update and an Alias override are active?
- Are there recommended patterns for maintaining visual consistency across derived states when component-specific token overrides are necessary?