with some CSS code found in different old posts on Stackoverflow I managed to change the placeholder colour of every selectizeInput and selectInput widget of my shinyapp, but it seems that this code doesn't work for the textInput widgets.
Below you can find a basic reproducible example:
library(shiny)
ui <- fluidPage(
tags$style(HTML("::placeholder { /* Chrome, Firefox, Opera, Safari 10.1+ */
color: red;
opacity: 1; /* Firefox */}
:-ms-input-placeholder { /* Internet Explorer 10-11 */
color: red;}
::-ms-input-placeholder { /* Microsoft Edge */
color: red;
}")),
br(),
selectizeInput(inputId = "one",
label = NULL,
choices = c("Letters" = "", "A", "B", "C"),
selected = ""),
br(),
textInput(inputId = "two",
label = NULL,
placeholder = "Numbers",
value = "")
)
server <- function(input, output, session) {
}
shinyApp(ui, server)
As you can see, the placeholder of the textInput widget remains gray, while I would like it to be red as well.
Thank you in advance for your help!