1

I have an angular 5 app and couple a days ago I have updated it to the latest v7. Of course, I have updated Angular Material + RxJS.

After that, I see a lot of UI issues. For example, for v5 I have used styleUrls for my component's and next CSS for cust UI for material components:

:host /deep/ mat-table {
    background: transparent !important;
}

Right now, with v7 it's doesn't work, but if I put this CSS into my component view, for example:

    <style>
        :host /deep/ mat-table {
             background: transparent !important;
         }
    </style>

    ....
<div class="row">
    <div class="col-sm-4">

Everything works fine like expected. That's why I think the problems with styleUrls but styles also doesn't work. I know nothing about how to fix that.

If someone knows how to resolve this issue please let me know.

P.S. With v5 all works fine, but with v7 it's doesn't work.

4

1 回答 1

2

正如我在评论中所说,您应该使用::ng-deep而不是/deep/Documentation。这是一个使用mat-tablehtml 元素的实时示例:Stackblitz angular v7

希望能帮助到你!

于 2018-11-18T13:56:30.357 回答