Check that component design tokens resolve to valid values
Categories
(Toolkit :: Themes, task)
Tracking
()
People
(Reporter: dao, Assigned: dao)
References
(Depends on 1 open bug, Blocks 1 open bug)
Details
Attachments
(2 external files)
Bug 2090765 adds token_resolve.py --check and the design-tokens CI task, which fail when a token in tokens-shared.css, tokens-platform.css or tokens-brand.css resolves to an invalid value, forms a var() cycle or exceeds the depth limit.
The check does not read the component *.tokens.css sheets (e.g. browser/themes/shared/urlbar/urlbar.tokens.css, toolkit/content/widgets/moz-badge/moz-badge.tokens.css), so a broken component token is still uncaught. These sheets declare their tokens on :host and read the realm tokens from there, so each has to be resolved on top of the realm it is loaded in: shared plus platform in chrome, shared plus brand in content.
Extend --check to resolve each component sheet against its realm, cover it in test_token_resolve.py, and drop the scoping sentence from the desktop-theme-tokens skill and the design tokens README once it lands.
| Assignee | ||
Comment 1•22 hours ago
|
||
The check now skips environments with browser.nova.enabled off for the realm sheets too, since tab.tokens.css's --tab-group-gray tokens reference primitives that only the Nova layer declares.
Updated•22 hours ago
|
| Assignee | ||
Comment 2•22 hours ago
|
||
Description
•