I have been using ng-zorro for my angular project, I am using this component: https://ng.ant.design/components/select/en#ng-content
However, I need to set specific with for the options the dropdown displays after it opens, I tried to do this:
> :host ::ng-deep { .ant-select-dropdown {
> width: 112px !important; } }
However, this style also applyes to all the other dropdowns, and I only wanted to give this width to just on dropdown, not all.
I have been looking for other alternative instead of ::ng-deep , but couldn't find one.
I really need to apply with to just one dropdown and not all of them, How can I accomplish this without the issue on ::ng-deep ?
::ng-deep change the style in every component (as you can see) and is deprecated actually (https://angular.io/guide/component-styles#deprecated-deep--and-ng-deep)
You could use ViewEncapsulation.None (documentation : https://angular.io/guide/view-encapsulation)