StackOverflow 讨论](https://stackoverflow.com/questions/67158490/spartacus-storefront-custom-theme-examples-changing-colors-and-bootstrap-variab))
一个例子。
/* You can add global styles to this file, and also import other style files */
$styleVersion: 3.2;
// change theme-colors here
$primary: #38a8ae !default;
$secondary: #148181 !default;
$success: #5dac06 !default;
$danger: #e51f34 !default;
$warning: #ffc107 !default;
$info: #17a2b8 !default;
$light: #d3d6db !default;
$dark: #161C23 !default;
$background: #f4f4f4 !default;
$inverse: #ffffff !default;
$text: #000000 !default;
$transparent: transparent !default;
$visual-focus: #6d9df7 !default;
$background-focus: rgba(80, 176, 244, 0.1);
$theme-colors: (
'primary': $primary,
'secondary': $secondary,
'success': $success,
'danger': $danger,
'warning': $warning,
'info': $info,
'light': $light,
'dark': $dark,
'background': $background,
'inverse': $inverse,
'text': $text,
'transparent': $transparent,
'visual-focus': $visual-focus,
'background-focus': $background-focus,
);
@import '~@spartacus/styles/index';
需要添加变量 $theme-colors
,赋以自定义颜色值。
I needed to add the variable with the updated colours.
网友评论