简体   繁体   English

Ng-select lib:我如何更改原色?

[英]Ng-select lib: How i change the primary color?

The primary color is #3f51b5, an blue dark color, but i want to customize this color.原色是#3f51b5,蓝色深色,但是我想定制这个颜色。 My research I discovery samples that:我的研究发现样本:

::ng-deep.ng-select.ng-select-focused.ng-select-container * { color: $colorP;important; }

but the code above just part of the color I want to change.但是上面的代码只是我想要更改的颜色的一部分。 How i change the primary color in the all code?我如何更改所有代码中的原色?

I just found code snippets that changed parts of the problem, but ended up creating others, I would like to know if there is a way to change all the color at once.我刚刚找到了改变部分问题的代码片段,但最终创建了其他代码片段,我想知道是否有一种方法可以一次更改所有颜色。

In Angular, you can change colors of your application by updating the theme file, typically located in the src/styles.scss or.css在 Angular 中,您可以通过更新主题文件来更改您的应用程序的 colors,通常位于 src/styles.scss 或 .css

Try this: or your selector, the idea to put the overriding style in the main file试试这个:或者你的选择器,将覆盖样式放在主文件中的想法

yourSelector {
    color: yourColor;
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM