title: legend labels not displaying inline when using labels and colors in leaflet map on shiny
body: <p>When i want to use <code>labels</code> and <code>colors</code> parameters with <code>addLegend()</code> function inside a <code>shinyApp</code>the legend is displayed in staircase as you can see below.
  But if i render the map only with <code>leaflet</code> outside of the <code>shinyApp</code>the labels are correctly displayed inline.<br>
  I have seen <a href="https://stackoverflow.com/questions/37951029/leaflet-legend-items-are-not-displayed-aligned-correctly-in-shiny">this post</a> with the same issue but their is no reproductible example so i decided to post my own question.</p>
  
  <ul>
  <li>Wrong Display (shiny dashboard)</li>
  </ul>
  
  <p><a href="https://i.stack.imgur.com/lGOco.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lGOco.png" alt="wrongDisplay"></a></p>
  
  <ul>
  <li>Correct Display (leaflet standalone)</li>
  </ul>
  
  <p><a href="https://i.stack.imgur.com/voRLq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/voRLq.png" alt="correctDisplay"></a> </p>
  
  <p>I made a reproductible example :  </p>
  
  <pre><code># ----- Load and install missing packages
  packages&lt;-c("shiny","shinydashboard","leaflet")
  new.packages &lt;- packages[!(packages %in% installed.packages()[,"Package"])]
  if(length(new.packages)) install.packages(new.packages)
  lapply(packages, require, character.only = TRUE)
  rm(list = c("new.packages","packages"))
  
  # ----- Reproductible Example
  
  # ----- UI
  header &lt;- dashboardHeader(title = "Repoductible Example")
  sidebar &lt;- dashboardSidebar(
    sidebarMenu(
      menuItem("map", tabName = "map", icon = icon("globe",lib="font-awesome"))
    )
  )
  body &lt;- dashboardBody(
    tabItems(
      tabItem(tabName= "map",
              column(width=12,
                     leafletOutput("mapExmpl", width="100%",height=600)))
    )
  )
  
  ui &lt;- dashboardPage(header, sidebar, body,skin="blue")
  
  # ----- Server
  server &lt;- function(input, output) {
    labels=c("Label1","Label2","Label3","Label4","Label5")
    colors&lt;-c(rgb(243,87,26,maxColorValue=256)
              ,rgb(225,205,19,maxColorValue=256)
              ,rgb(62,3,79,maxColorValue=256)
              ,rgb(17,126,147,maxColorValue = 256)
              ,rgb(61,255,80,maxColorValue=256))
    output$mapExmpl&lt;-renderLeaflet({
      leaflet()%&gt;%addTiles(
      )%&gt;%
        addLegend("bottomright", colors = colors, labels =labels ,
                  title = "Typo",
                  opacity = 1
        )
    })
  
  
  }
  
  shinyApp(ui,server)
  </code></pre>