Skip to content

Commit

Permalink
add a CSS fix for leaflet to avoid wider CSS to apply
Browse files Browse the repository at this point in the history
CSS conflict happened in Quarto context where a rule on `.legend` was applying to Leaflet own legend box
  • Loading branch information
cderv committed Dec 8, 2023
1 parent e15a997 commit 6717a8a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
6 changes: 6 additions & 0 deletions inst/htmlwidgets/lib/rstudio_leaflet/rstudio_leaflet.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

0 comments on commit 6717a8a

Please sign in to comment.