How to style the dash-table.DataTable tooltip with css keyword?

I need to change the text color for the tooltip in the data table. So far I got this:

dash_table.DataTable(...
                             css=[{
                                 "selector":  "dash-table-tooltip",
                                 "rule": 'color: "black"'}]
                             ),

but it doesn’t do anything. What did I do wrong?

Hey @AnnaZ
You might just be missing the dot in your selector → "selector": ".dash-table-tooltip"

2 Likes