rstudio / DT

R Interface to the jQuery Plug-in DataTables
https://rstudio.github.io/DT/
Other
587 stars 184 forks source link

Scroller extension incompatible with dark themes #1097

Open D3SL opened 7 months ago

D3SL commented 7 months ago

ordinarily the table is transparent and can work with themes, provided style = 'bootstrap' is included in DT::datatable(). Per this topic at datatables the scroller extension itself sets a white background due to scroller using a diagonal striped background to show unloaded regions while the user scrolls.

Since this is upstream in DT itself I think all that should be done here is update the documentation to note the incompatibility.

It's also possible to override some of the CSS that the scroller extension adds using the below snippet just above DTOutput(), but I don't know what other issues this will cause:

          tags$style(HTML('div.dts div.dataTables_scrollBody table {background-color:transparent}')),
          tags$style(HTML('div.DTS tbody tr {background-color:transparent}')),