Refactor Label CSS
This commit is contained in:
parent
2f4b97de19
commit
9c8590aebc
143
dist/leaflet.css
vendored
143
dist/leaflet.css
vendored
@ -540,108 +540,65 @@
|
|||||||
|
|
||||||
|
|
||||||
/* Label */
|
/* Label */
|
||||||
|
/* Base styles for the element that has a tooltip */
|
||||||
.leaflet-label {
|
.leaflet-label {
|
||||||
background: white;
|
|
||||||
background-clip: padding-box;
|
|
||||||
border-color: white;
|
|
||||||
border-radius: 2px;
|
|
||||||
border-style: solid;
|
|
||||||
border-width: 4px;
|
|
||||||
color: #111;
|
|
||||||
display: block;
|
|
||||||
font: 12px/20px "Helvetica Neue", Arial, Helvetica, sans-serif;
|
|
||||||
font-weight: bold;
|
|
||||||
padding: 1px 6px;
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
padding: 6px;
|
||||||
|
background-color: #fff;
|
||||||
|
border: 1px solid #222;
|
||||||
|
color: #222;
|
||||||
|
white-space: nowrap;
|
||||||
-webkit-user-select: none;
|
-webkit-user-select: none;
|
||||||
-moz-user-select: none;
|
-moz-user-select: none;
|
||||||
-ms-user-select: none;
|
-ms-user-select: none;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
white-space: nowrap;
|
}
|
||||||
z-index: 6;
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-label.leaflet-clickable {
|
.leaflet-label.leaflet-clickable {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
pointer-events: auto;
|
pointer-events: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.leaflet-label:before,
|
|
||||||
.leaflet-label:after {
|
|
||||||
border-top: 6px solid transparent;
|
|
||||||
border-bottom: 6px solid transparent;
|
|
||||||
border-right: 6px solid transparent;
|
|
||||||
content: none;
|
|
||||||
position: absolute;
|
|
||||||
top: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-label:before {
|
|
||||||
border-right: 6px solid black;
|
|
||||||
border-right-color: inherit;
|
|
||||||
left: -10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-label:after {
|
|
||||||
border-left: 6px solid black;
|
|
||||||
border-left-color: inherit;
|
|
||||||
right: -16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-label-top:after,
|
|
||||||
.leaflet-label-top:before,
|
.leaflet-label-top:before,
|
||||||
.leaflet-label-bottom:after,
|
.leaflet-label-bottom:before,
|
||||||
.leaflet-label-bottom:before {
|
.leaflet-label-left:before,
|
||||||
left: -49%; /* IE8 fallback */
|
.leaflet-label-right:before {
|
||||||
/* Calc include 4 px of border - minus half of the 6px of tip size */
|
position: absolute;
|
||||||
left: calc(-50% + 1px);
|
pointer-events: none;
|
||||||
position: relative;
|
border: 6px solid transparent;
|
||||||
top: 29px;
|
background: transparent;
|
||||||
}
|
|
||||||
.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;
|
|
||||||
border-bottom-color: transparent;
|
|
||||||
border-left-color: transparent;
|
|
||||||
border-top-color: transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-label-top:after {
|
|
||||||
content: ' ';
|
|
||||||
border-right-color: transparent;
|
|
||||||
border-bottom-color: transparent;
|
|
||||||
border-left-color: transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-label-bottom:before {
|
|
||||||
display: none;
|
|
||||||
border-right-color: transparent;
|
|
||||||
border-bottom-color: transparent;
|
|
||||||
border-left-color: transparent;
|
|
||||||
border-top-color: transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-label-bottom:after {
|
|
||||||
border-right-color: transparent;
|
|
||||||
border-top-color: transparent;
|
|
||||||
border-left-color: transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-label-bottom:after,
|
|
||||||
.leaflet-label-top:after,
|
|
||||||
.leaflet-label-right:before,
|
|
||||||
.leaflet-label-left:after {
|
|
||||||
content: "";
|
content: "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Directions */
|
||||||
|
|
||||||
|
.leaflet-label-bottom:before,
|
||||||
|
.leaflet-label-top:before {
|
||||||
|
left: 50%;
|
||||||
|
margin-left: -6px;
|
||||||
|
}
|
||||||
|
.leaflet-label-top:before {
|
||||||
|
bottom: 0;
|
||||||
|
margin-bottom: -12px;
|
||||||
|
border-top-color: #222;
|
||||||
|
}
|
||||||
|
.leaflet-label-bottom:before {
|
||||||
|
top: 0;
|
||||||
|
margin-top: -12px;
|
||||||
|
margin-left: -6px;
|
||||||
|
border-bottom-color: #222;
|
||||||
|
}
|
||||||
|
.leaflet-label-left:before,
|
||||||
|
.leaflet-label-right:before {
|
||||||
|
top: 50%;
|
||||||
|
margin-top: -6px;
|
||||||
|
}
|
||||||
|
.leaflet-label-left:before {
|
||||||
|
right: 0;
|
||||||
|
margin-right: -12px;
|
||||||
|
border-left-color: #222;
|
||||||
|
}
|
||||||
|
.leaflet-label-right:before {
|
||||||
|
left: 0;
|
||||||
|
margin-left: -12px;
|
||||||
|
border-right-color: #222;
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user