Search code examples
ng2-smart-table

Ng2-smart-table Single Cell styling


I wish to add custom coloring to a cell.

tried using

`styles: [`    
    :host /deep/ ng2-smart-table tbody > tr > td:first-child {
    color: red;
    }
    `]`

but this changes the color for the entire first column


Solution

  • If you want to color the first cell not only the first column you need to add first-child to tr as well:

    :host /deep/ ng2-smart-table tbody > tr:first-child > td:first-child {
      color: red;
      }