[英]How do I import css style from ts to less in angular cli?
我需要從.ts文件中插入樣式的原因較少:我有一個網站以及諸如內容管理器面板之類的東西,您可以在其中為其設置按鈕顏色。
當然,我可以在HTML模板中使用此CSS變量,例如:
[style.color] = “colorVar”
但是也許存在一些更好的解決方案?
您可以使用::ng-deep
來滲透某些組件並更改樣式。
some-component-selector ::ng-deep selector-inside-of-that-some-component {
//write the sytles here
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.