1
我在Angular 2中使用d3.js。由於模板元素是動態創建的,所以我必須使用「陰影穿透CSS組合器」。VS代碼 - Angular 2 Typescript - 如何刪除/修復css陰影穿孔錯誤?
:host /deep/ .arc-path:hover
{
fill: orange;
}
:host /deep/ .arc-path-sub:hover
{
fill: orange;
}
:host /deep/ .arc-path{
fill: cornflowerblue;
fill-opacity: 0.95;
cursor: pointer;
}
有使用此技術對角2 d3.js一個question,而這個CSS是去(ViewEncapsulation.None的選擇是不是一種選擇對我來說)的方式。
這些工作正常,但在VS代碼中,CSS文件顯示20錯誤,因爲它不能識別這些CSS組合器。有沒有辦法解決這個問題呢?允許VS Code接受這個語法,或者這是VSCode對我有幫助的突出問題嗎?
https://github.com/angular/angular/commit/b754e60 Angular 4.3.0 now usign :: ng-deep – Ryan