Search code examples
ng-zorro-antd

How to style ng-zorro component with angular css component?


I have a certain problem, for example:

I don't like the margin on the ng-zorro table. In my browser I can see that it gets the margin from .ant-table-small>.ant-table-content>.ant-table-body selector.

Is there some way to override it?

It doesn't exist in ng-zorro theme.less. I am terribly sorry for this noob question.


Solution

  • You can override the Angular css by ::ng-deep keyword, for example:

    ::ng-deep .ant-table-small>.ant-table-content>.ant-table-body {
        margin: 0;
    }