htmlcssangularprimeng

Override PrimeNG component CSS


I am using PrimeNG OverlayPanel to be displayed in dropdown click but I have a problem to move default left arrow to right position. I tried everything that was in my mind but I am out of ideas.

Can you please give me some new idea for resolving this issue?

code example: https://stackblitz.com/edit/primeng-overlaypanel-demo

dropdown arrow image


Solution

  • Add this to style.css:

    .p-overlaypanel:after, .p-overlaypanel:before{
      left: unset !important;
      right: 1.25rem !important;
      }
    

    Now the arrow is on the right side opposite of initial.

    Additional info: avoid using :host ::ng-deep as it is deprecated.. use the style.css file instead!