Design Tokens lists varFontSize7
not globally accessible.
Based on Use Lightning Design System Design Tokens, this should throw the error you're seeing
IMPORTANT If you get the error: No TOKEN named tokenName found, it's
likely that you're using a token that isn't marked Global Access.
Either use a global token or use a custom Aura design token.
So, the error message you started to receive is technically correct. However, it seems there's been a gap in the above validation - where non-globally accessible tokens in css formulas (ex. calc
) have gotten passed this validation.
An update essentially started catching the above scenario which is why some of these LWCs have started to throw this error. It's been reverted so you shouldn't be seeing these errors. If you are, I'd suggest putting in a support case.
In the end, if you did get this error - I would consider updating your LWC as I'm not sure what the future behavior will be.
lwc
. Strangely, this error was not reported when deployed before Spring '22 release, which makes me think, if this could be something Salesforce started enforcing in Spring '22 release. Not sure, though!