I'm stuck with some CSS in a shiny app. Can someone point out where I have gone wrong here? I just want to change the styling of the class. I don't want to do it inline as there would be many links. I've spent an hour on this and can't get it to work, unless it is inline.
Edited to make the example a better representation of my problem.
library(shiny)
library(shinydashboard)
# link details
url <- "https://www.abc.net.au/news"
target <- "_blank"
text <- "test_only"
the_link <- tags$span(class = "sidelink",
p(tags$a(href = url, target = target, text))
)
ui <- dashboardPage(
dashboardHeader(),
dashboardSidebar(
the_link # displays the link
),
dashboardBody(
tags$style(
type = 'text/css',
'.sidelink {text-decoration: underline; white-space: normal; margin-left: 10em; color: red; background-color: blue;}'
)
)
)
server <- function(input, output) { }
shinyApp(ui, server)