CSS for InsertUI elements containing a reactive value

...I am inserting ui elements in shiny in an incremental step. For this I had to create a reactive value which is used along-with the input id of my elements.

I am having no idea as how to use this customized ID for styling the app with CSS commands

I know how to use this type of id to style the app like

        selectInput(inputId ="Population_Year","Year", choices = df$Year)

But my id for inserting the ui elements is somewhat written like this

   Population<- reactiveValues(BTN = 0)
   Population$BTN <- Population$BTN +1

  insertUI(
  selector = "#Population_Panels", 
  ui = splitLayout(id = paste0("Population_Selection",Population$BTN), 
  where = "afterEnd",cellWidths = rep("16.66%",6),
  cellArgs = list(style = "padding:2px;margin-top:-1em;height: 60px; width:40px"),

     div(id ="Population_Year_DIV",
     selectInput(inputId = paste("Population_Year",Population$BTN+1,sep =  ""), 
                "YEAR",c("",Year$Year), selected = ""))),     

The customized Input ID is

  paste("Population_Year",Population$BTN+1, sep = "")

When inspected, the IDs are shown as Population_Year2, Population_Year3 and so on. This is I assume because of the incremental addition of UI elements and intputIDs have a index attached to it.

I want the font-size or color to be the same in each and every newly added ui elements. I can't think of anything as to how to do it as my CSS knowledge is very limited and therefore I need help in this regard.

Trying to use the div IDs didn't work for font size or color. Div IDs however could be used for changing the position of the panels but I need styling for the fonts displayed in the panels. Putting font-size in cellArgs also didn't work.

Thanks in advance

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.