Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

With Bootstrap 5, uiOutput() doesn't dim in opacity when recalculating #4027

Closed
cpsievert opened this issue Apr 9, 2024 · 0 comments · Fixed by #4028
Closed

With Bootstrap 5, uiOutput() doesn't dim in opacity when recalculating #4027

cpsievert opened this issue Apr 9, 2024 · 0 comments · Fixed by #4028

Comments

@cpsievert
Copy link
Collaborator

cpsievert commented Apr 9, 2024

Starting with #3957, uiOutput() (and conditionalPanel()) containers started getting display: contents;. Turns out this is problematic for the .recalculating { opacity: 0.3; } that shiny adds to output containers. Consider the following example which now fails to dim in opacity when recalculating (since the output container div is now display: contents;, opacity no longer applies):

library(shiny)
library(bslib)

ui <- page_fixed(
  actionButton("btn", "Press me"),
  uiOutput("foo")
)

server <- function(input, output, session) {
  
  output$foo <- renderUI({
    input$btn
    Sys.sleep(3)
    span(paste("Number of clicks:", input$btn))
  })
  
}

shinyApp(ui, server)
cpsievert added a commit that referenced this issue Apr 9, 2024
…nly apply display:content when there are child elements
cpsievert added a commit that referenced this issue Apr 10, 2024
* Close #4027: Fix opacity dimming on recalculating uiOutput(). Also, only apply display:content when there are child elements

* Update inst/www/shared/shiny_scss/shiny.bootstrap5.scss

* Add news item
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant