the-y-company / bsutils

Utilities for Bootstrap 5
Other
34 stars 3 forks source link

Modify offcanvas and other elements CSS #3

Closed alessio619 closed 2 years ago

alessio619 commented 2 years ago

Hi, I am very interested in adding many of the UI elements in the package, they are really easy to implement and useful. I've tried to add a tags$style(".offcanvas {background-color: #000000}") and other workarounds but I cannot change the buttons properties such as width and color.

Thanks!

JohnCoene commented 2 years ago

Do you have an example of shiny application where this fails?

alessio619 commented 2 years ago

I leave the very same reprez in your page, I wonder how can I change the button' s color:

`ui <- fluidPage( theme = bslib::bs_theme(version = 5L, bootswatch = 'zephyr'), offcanvas( offcanvasButton( "Open" ), offcanvasContent( offcanvasHeader( "Off canvas" ), p( "Hello world" ) ) ) )

server <- (input, output, session){}

shinyApp(ui, server) `

JohnCoene commented 2 years ago

And if below theme you add

tags$head(
  tags$style(
    ".offcanvas {background-color: #000000 }")
)

It does not work?

(Sorry no laptop access right now)

alessio619 commented 2 years ago

Works perfectly. Thanks