Quantcast
Viewing all articles
Browse latest Browse all 206473

Insert style tag from a variable with !important in an htmltools::div element

for the R code below, I am trying to add an !important tag after the background color, which comes from a variable, but it is not working:

``htmltools::div(
  class = "bar",
  style = list(
    width = paste0(percentage_b * 100, "%")
  ),
  htmltools::css(
    "background-color!" = bar_color
  )
)``

Viewing all articles
Browse latest Browse all 206473

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>