美文网首页
SAP Commerce Cloud Spartacus UI

SAP Commerce Cloud Spartacus UI

作者: _扫地僧_ | 来源:发表于2021-10-21 10:01 被阅读0次

问题

解答

The easiest and recommended way to override basic primary colors, as of version 4.0, is by changing the compiled values of the CSS variables. But change them inside a CSS body selector, instead of a :root selector.

Example of storefrontapp/src/styles.scss file:

/* You can add global styles to this file, and also import other style files */

$styleVersion: 4.0;
@import '~@spartacus/styles/index';

$useLatestStyles: true;

@import '@spartacus/styles';
@import '@spartacus/styles/scss/theme/santorini';

body {
  --cx-color-primary: green;
  --cx-color-seconday: #8aa39b;
  --cx-color-text: #5c6f68;
  --cx-color-background: #95d9c3;
  --cx-color-dark: #a4f9c8;
}

生效了:


相关文章

网友评论

      本文标题:SAP Commerce Cloud Spartacus UI

      本文链接:https://www.haomeiwen.com/subject/ytrcgltx.html