【问题标题】:Apply Standard Design Community Tokens in the Lightning Web Component (LWC)在 Lightning Web 组件 (LWC) 中应用标准设计社区令牌
【发布时间】:2020-05-08 05:51:04
【问题描述】:

根据https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/tokens_standard_communities.htm,我想在闪电网络组件 (LWC) 中使用社区代币。

在 LWC CSS 文件中,我将 textTransform 标记应用为,

.cssClass{
    text-transform: var(--lwc-textTransform);
}

保存 LWC 时发生错误找不到名为 textTransform 的 TOKEN。 如何在 LWC 中使用 textTransform 令牌?

【问题讨论】:

    标签: salesforce-lightning salesforce-communities lwc


    【解决方案1】:

    它似乎仅适用于 Aura 组件,并且在定义中未标记为全局,

    如下链接:

    Lightning Web 组件可以使用任何标记为 Global Access 的 Lightning Design System 设计令牌。如果您收到错误:未找到名为 tokenName 的 TOKEN,您可能正在使用未标记为 Global Access 的令牌。使用全局令牌或使用自定义 Aura 设计令牌。

    https://developer.salesforce.com/docs/component-library/documentation/en/lwc/lwc.create_components_css_design_tokens

    【讨论】:

      猜你喜欢
      • 2023-02-25
      • 1970-01-01
      • 1970-01-01
      • 2016-07-08
      • 1970-01-01
      • 2022-01-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多