Within my shiny app, I am implementing the yeti theme using the bslib library along with a datatable that features bootstrap styling. However, I have encountered an issue where unwanted white cell borders are appearing in the datatable when compared to utilizing other bootstrap stylings like bootstrap5 or the shinythemes library.
I attempted to resolve this by performing a CSS override, but unfortunately it did not yield the desired results:
library(shiny)
library(DT)
library(bslib)
ui <- navbarPage("A reproducible Shiny app",
theme = bs_theme(bootswatch = "yeti"),
tabPanel("MAIN",
tags$style('#mytable td {cell-border:0}'),
mainPanel(DT::dataTableOutput('mytable'))
)
)
server <- function(input, output,session) {
output$mytable = DT::renderDataTable(
datatable(mtcars[1:3], style="bootstrap")
)
}
runApp(list(ui = ui, server = server))