X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/4d19c6892c74655860ee623baf77b8516c446d5d..2401515ca6010ccfabfcf5736e961c09ef8df943:/vendor/assets/leaflet/leaflet.css diff --git a/vendor/assets/leaflet/leaflet.css b/vendor/assets/leaflet/leaflet.css index a9e44fd92..938a1be54 100644 --- a/vendor/assets/leaflet/leaflet.css +++ b/vendor/assets/leaflet/leaflet.css @@ -12,60 +12,54 @@ .leaflet-overlay-pane svg, .leaflet-zoom-box, .leaflet-image-layer, -.leaflet-layer { /* TODO optimize classes */ +.leaflet-layer { position: absolute; + left: 0; } .leaflet-container { overflow: hidden; - outline: 0; + -ms-touch-action: none; } .leaflet-tile, .leaflet-marker-icon, .leaflet-marker-shadow { - -moz-user-select: none; -webkit-user-select: none; - user-select: none; + -moz-user-select: none; + user-select: none; } .leaflet-marker-icon, .leaflet-marker-shadow { display: block; } -.leaflet-clickable { - cursor: pointer; - } -.leaflet-dragging, .leaflet-dragging .leaflet-clickable { - cursor: move; - } +/* map is broken in FF if you have max-width: 100% on tiles */ .leaflet-container img { - /* map is broken in FF if you have max-width: 100% on tiles */ max-width: none !important; } +/* stupid Android 2 doesn't understand "max-width: none" properly */ .leaflet-container img.leaflet-image-layer { - /* stupid Android 2 doesn't understand "max-width: none" properly */ - max-width: 15000px !important; - } - -.leaflet-tile-pane { z-index: 2; } -.leaflet-objects-pane { z-index: 3; } -.leaflet-overlay-pane { z-index: 4; } -.leaflet-shadow-pane { z-index: 5; } -.leaflet-marker-pane { z-index: 6; } -.leaflet-popup-pane { z-index: 7; } - + max-width: 15000px !important; + } .leaflet-tile { - filter: inherit; - visibility: hidden; + filter: inherit; + visibility: hidden; } .leaflet-tile-loaded { visibility: inherit; } - .leaflet-zoom-box { - width: 0; - height: 0; - } + width: 0; + height: 0; + } + +.leaflet-tile-pane { z-index: 2; } +.leaflet-objects-pane { z-index: 3; } +.leaflet-overlay-pane { z-index: 4; } +.leaflet-shadow-pane { z-index: 5; } +.leaflet-marker-pane { z-index: 6; } +.leaflet-popup-pane { z-index: 7; } -/* Leaflet controls */ + +/* control positioning */ .leaflet-control { position: relative; @@ -110,30 +104,112 @@ margin-right: 10px; } + +/* zoom and fade animations */ + +.leaflet-fade-anim .leaflet-tile, +.leaflet-fade-anim .leaflet-popup { + opacity: 0; + -webkit-transition: opacity 0.2s linear; + -moz-transition: opacity 0.2s linear; + -o-transition: opacity 0.2s linear; + transition: opacity 0.2s linear; + } +.leaflet-fade-anim .leaflet-tile-loaded, +.leaflet-fade-anim .leaflet-map-pane .leaflet-popup { + opacity: 1; + } + +.leaflet-zoom-anim .leaflet-zoom-animated { + -webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1); + -moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1); + -o-transition: -o-transform 0.25s cubic-bezier(0,0,0.25,1); + transition: transform 0.25s cubic-bezier(0,0,0.25,1); + } +.leaflet-zoom-anim .leaflet-tile, +.leaflet-pan-anim .leaflet-tile, +.leaflet-touching .leaflet-zoom-animated { + -webkit-transition: none; + -moz-transition: none; + -o-transition: none; + transition: none; + } + +.leaflet-zoom-anim .leaflet-zoom-hide { + visibility: hidden; + } + + +/* cursors */ + +.leaflet-clickable { + cursor: pointer; + } +.leaflet-container { + cursor: -webkit-grab; + cursor: -moz-grab; + } +.leaflet-popup-pane, +.leaflet-control { + cursor: auto; + } +.leaflet-dragging, +.leaflet-dragging .leaflet-clickable, +.leaflet-dragging .leaflet-container { + cursor: move; + cursor: -webkit-grabbing; + cursor: -moz-grabbing; + } + + +/* visual tweaks */ + +.leaflet-container { + background: #ddd; + outline: 0; + } +.leaflet-container a { + color: #0078A8; + } +.leaflet-container a.leaflet-active { + outline: 2px solid orange; + } +.leaflet-zoom-box { + border: 2px dotted #05f; + background: white; + opacity: 0.5; + } + + +/* general typography */ +.leaflet-container { + font: 12px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif; +} + + +/* zoom control */ + .leaflet-control-zoom { - -moz-border-radius: 7px; -webkit-border-radius: 7px; - border-radius: 7px; + border-radius: 7px; } .leaflet-control-zoom { padding: 5px; background: rgba(0, 0, 0, 0.25); } .leaflet-control-zoom a { + width: 19px; + height: 19px; background-color: rgba(255, 255, 255, 0.75); + -webkit-border-radius: 4px; + border-radius: 4px; } -.leaflet-control-zoom a, .leaflet-control-layers-toggle { +.leaflet-control-zoom a, +.leaflet-control-layers-toggle { background-position: 50% 50%; background-repeat: no-repeat; display: block; } -.leaflet-control-zoom a { - -moz-border-radius: 4px; - -webkit-border-radius: 4px; - border-radius: 4px; - width: 19px; - height: 19px; - } .leaflet-control-zoom a:hover { background-color: #fff; } @@ -149,12 +225,14 @@ background-image: url(images/zoom-out.png); } + +/* layers control */ + .leaflet-control-layers { box-shadow: 0 1px 7px #999; background: #f8f8f9; - -moz-border-radius: 8px; -webkit-border-radius: 8px; - border-radius: 8px; + border-radius: 8px; } .leaflet-control-layers-toggle { background-image: url(images/layers.png); @@ -175,7 +253,6 @@ } .leaflet-control-layers-expanded { padding: 6px 10px 6px 6px; - font: 12px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif; color: #333; background: #fff; } @@ -193,30 +270,29 @@ margin: 5px -10px 5px -6px; } + +/* attribution and scale controls */ + .leaflet-container .leaflet-control-attribution { background-color: rgba(255, 255, 255, 0.7); box-shadow: 0 0 5px #bbb; margin: 0; - } - + } .leaflet-control-attribution, .leaflet-control-scale-line { padding: 0 5px; color: #333; } - .leaflet-container .leaflet-control-attribution, .leaflet-container .leaflet-control-scale { - font: 11px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif; + font-size: 11px; } - .leaflet-left .leaflet-control-scale { margin-left: 5px; } .leaflet-bottom .leaflet-control-scale { margin-bottom: 5px; } - .leaflet-control-scale-line { border: 2px solid #777; border-top: none; @@ -245,42 +321,7 @@ } -/* Zoom and fade animations */ - -.leaflet-fade-anim .leaflet-tile, .leaflet-fade-anim .leaflet-popup { - opacity: 0; - - -webkit-transition: opacity 0.2s linear; - -moz-transition: opacity 0.2s linear; - -o-transition: opacity 0.2s linear; - transition: opacity 0.2s linear; - } -.leaflet-fade-anim .leaflet-tile-loaded, .leaflet-fade-anim .leaflet-map-pane .leaflet-popup { - opacity: 1; - } - -.leaflet-zoom-anim .leaflet-zoom-animated { - -webkit-transition: -webkit-transform 0.25s cubic-bezier(0.25,0.1,0.25,0.75); - -moz-transition: -moz-transform 0.25s cubic-bezier(0.25,0.1,0.25,0.75); - -o-transition: -o-transform 0.25s cubic-bezier(0.25,0.1,0.25,0.75); - transition: transform 0.25s cubic-bezier(0.25,0.1,0.25,0.75); - } - -.leaflet-zoom-anim .leaflet-tile, -.leaflet-pan-anim .leaflet-tile, -.leaflet-touching .leaflet-zoom-animated { - -webkit-transition: none; - -moz-transition: none; - -o-transition: none; - transition: none; - } - -.leaflet-zoom-anim .leaflet-zoom-hide { - visibility: hidden; - } - - -/* Popup layout */ +/* popup */ .leaflet-popup { position: absolute; @@ -289,9 +330,15 @@ .leaflet-popup-content-wrapper { padding: 1px; text-align: left; + -webkit-border-radius: 20px; + border-radius: 20px; } .leaflet-popup-content { margin: 14px 20px; + line-height: 1.4; + } +.leaflet-popup-content p { + margin: 18px 0; } .leaflet-popup-tip-container { margin: 0 auto; @@ -307,11 +354,17 @@ margin: -8px auto 0; - -moz-transform: rotate(45deg); -webkit-transform: rotate(45deg); - -ms-transform: rotate(45deg); - -o-transform: rotate(45deg); - transform: rotate(45deg); + -moz-transform: rotate(45deg); + -ms-transform: rotate(45deg); + -o-transform: rotate(45deg); + transform: rotate(45deg); + } +.leaflet-popup-content-wrapper, .leaflet-popup-tip { + background: white; + + box-shadow: 0 3px 14px rgba(0,0,0,0.35); + -webkit-box-shadow: 0 3px 18px rgba(0,0,0,0.33); } .leaflet-container a.leaflet-popup-close-button { position: absolute; @@ -329,9 +382,6 @@ .leaflet-container a.leaflet-popup-close-button:hover { color: #999; } -.leaflet-popup-content p { - margin: 18px 0; - } .leaflet-popup-scrolled { overflow: auto; border-bottom: 1px solid #ddd; @@ -339,40 +389,13 @@ } -/* Visual appearance */ +/* div icon */ -.leaflet-container { - background: #ddd; - } -.leaflet-container a { - color: #0078A8; - } -.leaflet-container a.leaflet-active { - outline: 2px solid orange; - } -.leaflet-zoom-box { - border: 2px dotted #05f; - background: white; - opacity: 0.5; - } .leaflet-div-icon { - background: #fff; - border: 1px solid #666; - } -.leaflet-editing-icon { - border-radius: 2px; - } -.leaflet-popup-content-wrapper, .leaflet-popup-tip { - background: white; - - box-shadow: 0 3px 14px rgba(0,0,0,0.35); - -webkit-box-shadow: 0 3px 18px rgba(0,0,0,0.33); - } -.leaflet-popup-content-wrapper { - -moz-border-radius: 20px; - -webkit-border-radius: 20px; - border-radius: 20px; + background: #fff; + border: 1px solid #666; } -.leaflet-popup-content { - font: 12px/1.4 "Helvetica Neue", Arial, Helvetica, sans-serif; +.leaflet-editing-icon { + -webkit-border-radius: 2px; + border-radius: 2px; }