I'm making a user interface in Shiny and am trying to make a bunch of stylized buttons. I suceeded in having them be the color I want, and the last thing I want is for the button to darken on hover, like the default buttons do.
I've made the following function for these buttons:
dateButton <- function(id, label) {
actionButton(inputId = id, label = label, style = "color: white;
background-color: darkblue;
border-radius:15%;
border-color: white;
.hover {
box-shadow: inset 0 0 100px 100px rgba(255, 255, 255, 0.1);
}")
}
I'm sure the problem is .hover
, I can't find how to format these list-like attributes. Any resources would also be appreciated.
Repr:
library(shiny)
dateButton <- function(id, label) {
actionButton(inputId = id, label = label, style = "color: white;
background-color: darkblue;
border-radius:15%;
border-color: white;
.hover {
box-shadow: inset 0 0 100px 100px rgba(255, 255, 255, 0.1);;}")
ui <- fluidPage(
dateButton("my_button", "B1"),
actionButton("default_button", "B2")
)
server <- function(input, output, session) {
}
shinyApp(ui, server)
}
When ran, B2 does what I want on hover, while B1 doesn't.