How do I set the selected row color?
The 1.12 release notes say I should be able to just apply the background color.
I can't get the test case to select a row or color the background: TestCase
Thank for the help!
This question has an accepted answers - jump to answer
Actually, the selected row colour is applied using a box-shadow, making it easier to apply a background colour for things like highlighting data.
This is the primary location for that.
So:
table.display.dataTable > tbody > tr.selected > *, table.display.dataTable > tbody > tr.odd.selected > *, table.display.dataTable > tbody > tr.selected:hover > * { box-shadow: inset 0 0 0 9999px red; }
http://live.datatables.net/venagufi/1/edit
Note that I've disabled orderClasses in that example. With that you'd need to add colouring for the ordering classes as well.
orderClasses
Better yet would be to change the SCSS variable and rebuild the CSS from that.
Allan
Thanks Allan!
It looks like you're new here. If you want to get involved, click one of these buttons!
Answers
Actually, the selected row colour is applied using a box-shadow, making it easier to apply a background colour for things like highlighting data.
This is the primary location for that.
So:
http://live.datatables.net/venagufi/1/edit
Note that I've disabled
orderClasses
in that example. With that you'd need to add colouring for the ordering classes as well.Better yet would be to change the SCSS variable and rebuild the CSS from that.
Allan
Thanks Allan!