7.4.7 自定义主题
==强烈建议:==在模板中不要配置与颜色有关的样式,否则自定义主题不生效很难排错。
-
明亮模式
-
新建
src/styles/element/light.scss
// only scss variables $--colors: ( 'primary': ( 'base': green, ), ); @forward 'element-plus/theme-chalk/src/common/var.scss' with ( $colors: $--colors );
-
修改
src\styles\element\index.scss
// styles/element/index.scss // we can add this to custom namespace, default is 'el' @forward 'element-plus/theme-chalk/src/mixins/config.scss' with ( $namespace: 'ym' ); // +
-