diff --git a/NEWS.md b/NEWS.md index dc1d14a45..788b5d0fb 100644 --- a/NEWS.md +++ b/NEWS.md @@ -2,6 +2,8 @@ * Fixed #893: Correctly call `terra::crs()` when checking the CRS of a `SpatVector` object in `pointData()` or `polygonData()` (thanks @mkoohafkan, #894). +* Applying new CSS rule to patch leaflet by explicitly lefet aligning legend text content. + # leaflet 2.2.1 * When `addProviderTiles()` is used with `{leaflet.providers}` version 2.0.0 or later, the `leaflet-providers` HTML dependency produced can be correctly cached by knitr. When used with older versions of `{leaflet.providers}`, the HTML dependency uses temp files that break knitr's caching mechanism (thanks @qdread, @jaredlander; #884). diff --git a/inst/htmlwidgets/lib/rstudio_leaflet/rstudio_leaflet.css b/inst/htmlwidgets/lib/rstudio_leaflet/rstudio_leaflet.css index c10d2f113..527df39a4 100644 --- a/inst/htmlwidgets/lib/rstudio_leaflet/rstudio_leaflet.css +++ b/inst/htmlwidgets/lib/rstudio_leaflet/rstudio_leaflet.css @@ -39,3 +39,9 @@ Fix for https://github.com/rstudio/rmarkdown/issues/1949 */ max-width: none !important; max-height: none !important; } + +/* Add explicit alignment rule to avoid CSS wider CSS applying to legend content +Fix for https://github.com/quarto-dev/quarto-cli/issues/7843 */ +.leaflet .legend.leaflet-control { + text-align: left; +}