Skip to content

Popup font drastically smaller since update to 1.8.0Β #8385

Closed
@nenadvicentic

Description

Checklist

  • I've looked at the documentation to make sure the behavior isn't documented and expected.
  • I'm sure this is an issue with Leaflet, not with my app or other dependencies (Angular, Cordova, React, etc.).
  • I've searched through the current issues to make sure this hasn't been reported yet.
  • I agree to follow the Code of Conduct that this project adheres to.

Steps to reproduce

  1. Do NOT have any CSS rules related to the size of the popup font in your project. Popup will pick up font-size of 12px from the leaflet.css:
/* general typography */
.leaflet-container {
	font: 12px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif;
}
  1. Upgrade from earlier version (in my case 1.6.x) to 1.8.0.

  2. Open a popup on the map.

Font-size is now picked up from the rule:

.leaflet-popup-content {
	margin: 13px 24px 13px 20px;
	line-height: 1.3;
	font-size: 13px;
	font-size: 1.08333em;
	min-height: 1px;
}

So, because it's font-size: 1.08333em; and because it's em and not rem, effective font-size is 8.12498px, which is way too small.

Expected behavior

Font in the popup is normal size and easy to read.

Current behavior

Font in the popup is so small (8.12498px), that it's practically unreadable.

Minimal example reproducing the issue

No response

Environment

  • Leaflet version: 1.8.0
  • Browser (with version): Chrome 103, Firefox 103
  • OS/Platform (with version): Windows 10, Windows 11

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions