BhandariS
BhandariS

Reputation: 604

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

Upvotes: 2

Views: 3073

Answers (1)

Lumix
Lumix

Reputation: 319

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;
  }

Upvotes: 4

Related Questions