Better margin around popup title icon

This commit is contained in:
Yohan Boniface 2024-01-08 12:00:19 +01:00
parent 86de16521f
commit ba6371381a
2 changed files with 3 additions and 2 deletions

View file

@ -271,6 +271,7 @@ L.U.PopupTemplate.OSM = L.U.PopupTemplate.Default.extend({
title.style.backgroundColor = color
const iconUrl = this.feature.getDynamicOption('iconUrl')
let icon = L.U.Icon.makeIconElement(iconUrl, title)
L.DomUtil.addClass(icon, 'icon')
L.U.Icon.setIconContrast(icon, title, iconUrl, color)
if (L.DomUtil.contrastedColor(title, color)) title.style.color = 'white'
L.DomUtil.add('span', '', title, this.getName())

View file

@ -1277,8 +1277,8 @@ a.add-datalayer:hover,
display: flex;
align-items: center;
}
.popup-title img {
margin: 0 5px;
.popup-title .icon {
margin: 5px;
}
a[href^='mailto']::before {
content: '🖃 ';