Grid Styling - Overwrite style of ag-grid

后端 未结 3 632
粉色の甜心
粉色の甜心 2020-12-04 02:24

I have the following style:

.ag-theme-fresh .ag-row-selected {
    background-color: #bde2e5; 
}`

It comes from a css style file of a theme

3条回答
  •  再見小時候
    2020-12-04 02:43

    You should use ViewEncapsulation

    Just add to your component encapsulation: ViewEncapsulation.None:

    import { Component, ViewEncapsulation } from "@angular/core";
    
    @Component({
        selector: '....',
        templateUrl: '....',
        styles: [`
            .ag-theme-fresh .ag-row-selected {
                background-color: #1428df !important;
            }
        `],
        encapsulation: ViewEncapsulation.None
    })
    

提交回复
热议问题