SAP Commerce Cloud Spartacus UI 修改 primary color 的方法
生活随笔
收集整理的這篇文章主要介紹了
SAP Commerce Cloud Spartacus UI 修改 primary color 的方法
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
問題
解答
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 修改 primary color 的方法的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 几种常见的软件架构是什么?(CNN几种常
- 下一篇: SAP 电商云 Spartacus SS