From: John Firebaugh Date: Fri, 9 Nov 2012 20:11:35 +0000 (-0800) Subject: Fix user popup styles X-Git-Tag: live~5743^2~17 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/ed84516db2ccf634c8639d15fc39b1896f66cd18 Fix user popup styles --- diff --git a/app/assets/javascripts/user.js b/app/assets/javascripts/user.js index 25456d04e..4e1c7d0c3 100644 --- a/app/assets/javascripts/user.js +++ b/app/assets/javascripts/user.js @@ -33,7 +33,7 @@ $(document).ready(function () { var user = $(this).data('user'); if (user.lon && user.lat) { L.marker([user.lat, user.lon], {icon: getUserIcon(user.icon)}).addTo(map) - .bindPopup(user.description); + .bindPopup(user.description, {offset: L.point(-1, -20)}); } }); } diff --git a/app/assets/stylesheets/common.css.scss b/app/assets/stylesheets/common.css.scss index ee10f6098..c0796bdad 100644 --- a/app/assets/stylesheets/common.css.scss +++ b/app/assets/stylesheets/common.css.scss @@ -1007,6 +1007,10 @@ p#contributorGuidance { /* Rules for user popups on maps */ +.user_popup { + min-width: 200px; +} + .user_popup p { padding-top: 3px; padding-bottom: 3px; diff --git a/app/assets/stylesheets/leaflet-all.css b/app/assets/stylesheets/leaflet-all.css index 15f427b77..5270dd6b8 100644 --- a/app/assets/stylesheets/leaflet-all.css +++ b/app/assets/stylesheets/leaflet-all.css @@ -11,3 +11,13 @@ background: #fff; border-radius: 3px; } + +/* Override some conflicting styles. + https://github.com/openstreetmap/openstreetmap-website/pull/121#issuecomment-10206946 */ +.leaflet-popup-content img.user_thumbnail { + max-width: 50px !important; +} + +.user_popup p { + margin: 0px 2px 0px 55px !important; +}