I’m trying to add a style in shiny
but when I check Chrome
it shows up as #input-label + div > div {width: 150px}
, >
should actually be >
. What is causing this?
library(shiny)
ui <- fluidPage(
tags$style("#input-label + div > div {width: 150px;}"),
numericInputIcon("input", "input", 42, icon = "Num")
)
server <- function(input, output, session) {
}
shinyApp(ui, server)
2
Answers
The issue is that you pass a character string which gets escaped, i.e. the
>
is replaced by the HTM entity>
. To prevent that you have to wrap inHTML()
so thatThis also mentioned in the docs (see
?tags
) according to which...
may includethis happens because chrome read the line as html
try this: