how to change --bs-table-hover-bg,--bs-table-striped-bg colors.bg colors of rows when mouse hover
how to change --bs-table-hover-bg,--bs-table-striped-bg colors.bg colors of rows when mouse hover
AshaM
Posts: 8Questions: 1Answers: 0
Link to test case:
Debugger code (debug.datatables.net):
Error messages shown:
Description of problem:
Answers
how to --bs-table-striped-bg and --bs-table-hover-bg that is backgroud colors of rows when mouse hover on it and striped colors of row
You need to use
--dt-row-stripe
and--dt-row-hover
rather than the Bootstrap specific ones. The reason for that is that I use those variables for more than just striping and hovering - they need to be tinted for the ordering column, row selection, etc, as well.Note that those CSS variables use
red green blue
formatting - note that there is no comma - e.g.:Allan
i want to give colors in variables like var(--color-base)
Yes, the two variables I mentioned are the two you need to set.
Allan
can we set color like table {
--dt-row-stripe: red;
} OR table {
--dt-row-stripe: #801C7D;
} OR table {
--dt-row-stripe: var(--color-base-shade7));
}
Like I showed above.
Because of the variations it can perform on it for the shading, there is no comma between the rgb values.
Allan