1

It is not clear how can we define custom tokens to be used in the community in a different file then defaultTokens.tokens.

Looks like that only tokens which values are defined in the defaultTokens.tokens, are applied.

If a new file is created with token values, they are not applied to LWC components.

The documentation says

Your first tokens bundle should be named defaultTokens. The tokens defined within defaultTokens are automatically accessible in your Lightning components. Tokens defined in any other bundle won’t be accessible in your components unless you import them into the defaultTokens bundle.

Still, it is not clear how can I import a token file into default tokens.

Does anyone know how can we import tokens into defaultTokens so that they are applied for Community?

1
  • Have you tried to have tokens1 file which extends force:base, and then defaultsTokens extends tokens1 ? – Patlatus Aug 6 '20 at 12:18
0

Please refer to this link. You need to extend forceCommunity:base is your tokens component if you want to make these tokens available for your Community.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.