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 title.style.backgroundColor = color
const iconUrl = this.feature.getDynamicOption('iconUrl') const iconUrl = this.feature.getDynamicOption('iconUrl')
let icon = L.U.Icon.makeIconElement(iconUrl, title) let icon = L.U.Icon.makeIconElement(iconUrl, title)
L.DomUtil.addClass(icon, 'icon')
L.U.Icon.setIconContrast(icon, title, iconUrl, color) L.U.Icon.setIconContrast(icon, title, iconUrl, color)
if (L.DomUtil.contrastedColor(title, color)) title.style.color = 'white' if (L.DomUtil.contrastedColor(title, color)) title.style.color = 'white'
L.DomUtil.add('span', '', title, this.getName()) L.DomUtil.add('span', '', title, this.getName())

View file

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