What is Best way to override the style of primeng components?

后端 未结 6 1488
南方客
南方客 2020-12-02 17:02

i want to overright the style of primeng components as per component level not for whole app, either i have to change the style in main theme.css file or inline

6条回答
  •  北海茫月
    2020-12-02 18:00

    Since >>> is deprecated have to use ::ng-deep instead. With material2 v6 and primeng v5.2.*

    :host {
        ::ng-deep .prime-slider-override {
            background-color: #26A3D1;
            background-image:none;
            border:none;
            color:white;
    
            .ui-slider-range {
                background: red;
            }
        }    
    }

提交回复
热议问题