How to style the PrimeNg components?

Discussão em 'Angular' iniciado por Dushyant Aneja, Fevereiro 8, 2025.

  1. I am using the PrimeNg library in my current project and trying to style the components of this library but the problem is we can not style those components using our normal css classes so for the time being I found out that


    1. We can use the ::ng-deep instead for styling. So I did use this but this is not the legit or proper way of styling these components


    2. In-line styling: this is also not a great way of doing styling in a client project

    So if anyone could help with this problem how can we style any alternative way of doing this?

    :host ::ng-deep .p-sidebar {
    width: 285px;
    background-color: #fafafa;
    height: 100vh;
    ::-webkit-scrollbar {
    display: none;
    }
    }

    Continue reading...

Compartilhe esta Página