Search code examples
cssangularbootstrap-4bootstrap-modalangular12

How to avoid a specific css file to apply on my Component in Angular


I'm currently using bootstrap for my modal component but our current project has a css file that is using the same class with bootstrap (.Modal,.Modal-header).

The css styling of both files was messing the modal design.

Any solution for this?

Update

I use ::ng-deep to my css so I can specifically target without conflicting other css file.


Solution

  • I think you should not use Bootstrap components in your class. If this was not helpful, please check ask from https://stackoverflow.com/users/395910/terry or https://stackoverflow.com/users/8213994/aman-gojariya. They helped me too.