I am trying to change the colour of the text in a row in a mudblazor table. I've added functionality that successfully identifies what the correct background colour is but the text colour is not being overwritten.
https://try.mudblazor.com/snippet/QaGIavvpnWMaTuJO
As can be seen in the example each row is designated a background and foreground colour. Whilst the background of each row is successfully changed to their respective Background Colour the text remains black. That is the Foreground Colour is not being applied like the Background Colour. Why is this and how can I fix this? The idea is that when I have darker backgrounds the text will be white so that it is readable but right now I cannot use some of my colour palette.
My current work around is to apply styling to each but this defeats the purpose of the RowStyleFunc.
The table-cells color is overwritten by the cell itself
.mud-table-root .mud-table-body .mud-table-cell {
color: var(--mud-palette-text-primary);
}
so you can overwrite it yourself:
style>
.mud-table-root .mud-table-body .mud-table-cell{
color: inherit;
}
</style>