From accad9c35f0d92745e4dbe745fad77ff958b1090 Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Tue, 17 May 2016 17:12:19 +0200 Subject: [PATCH] Add CSS fallback to label tip position, as calc is not supported by IE8 --- dist/leaflet.css | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/dist/leaflet.css b/dist/leaflet.css index ec1aa329..33c80828 100644 --- a/dist/leaflet.css +++ b/dist/leaflet.css @@ -576,14 +576,25 @@ } .leaflet-label-top:after, -.leaflet-label-top:before { +.leaflet-label-top:before, +.leaflet-label-bottom:after, +.leaflet-label-bottom:before { + left: -49%; /* IE8 fallback */ /* Calc include 4 px of border - minus half of the 6px of tip size */ left: calc(-50% + 1px); - border-top-color: white; position: relative; top: 29px; } +.leaflet-label-top:after, +.leaflet-label-top:before { + border-top-color: white; +} +.leaflet-label-bottom:after, +.leaflet-label-bottom:before { + border-bottom-color: white; + top: -28px; +} .leaflet-label-top:before { display: none; border-right-color: transparent; @@ -607,15 +618,6 @@ border-top-color: transparent; } -.leaflet-label-bottom:after, -.leaflet-label-bottom:before { - /* Calc include 4 px of border - minus half of the 6px of tip size */ - left: calc(-50% + 1px); - border-bottom-color: white; - position: relative; - top: -28px; -} - .leaflet-label-bottom:after { border-right-color: transparent; border-top-color: transparent;