Skip to main content
2 réponses
  1. 11 mai 2021, 07:25
    Hi Rahul,

    Basically,you can capture the essential values of your visual design into named tokens. Define the token values once and reuse them throughout your Lightning components CSS resources. Tokens make it easy to ensure that your design is consistent, and even easier to update it as your design evolves.

    Design tokens are visual design “atoms” for building a design for your components or apps. Specifically, they’re named entities that store visual design attributes, such as pixel values for margins and spacing, font sizes and families, or hex values for colors. Tokens are a terrific way to centralize the low-level values, which you then use to compose the styles that make up the design of your component or app.

    Please note tokens collections have restricted support for expressions; see Using Expressions in Tokens. You can’t use other markup, renderers, controllers, or anything else in a tokens collection.

    "You can only cross-reference tokens defined in the same file or a parent.

    Expression syntax in tokens resources is restricted to references to other tokens."

    Reference:

    https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/tokens_expressions.htm

    Hope above information helps, Please mark as Best Answer so that it can help others in the future.

    Thanks.