meshviewer/scss/modules/_leaflet.scss

533 lines
8.5 KiB
SCSS
Raw Normal View History

2016-12-28 03:21:55 +00:00
.leaflet-pane,
2017-02-11 16:26:57 +00:00
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-tile-container,
2016-12-28 03:21:55 +00:00
.leaflet-pane > svg,
.leaflet-pane > canvas,
2017-02-11 16:26:57 +00:00
.leaflet-zoom-box,
.leaflet-image-layer,
.leaflet-layer {
left: 0;
position: absolute;
top: 0;
}
.leaflet-container {
2016-12-28 03:21:55 +00:00
background: $color-gray-light;
2017-02-11 16:26:57 +00:00
outline: 0;
overflow: hidden;
2016-12-28 03:21:55 +00:00
.leaflet-control-attribution {
background: transparentize($color-white, .3);
margin: 0;
}
.leaflet-control-attribution,
.leaflet-control-scale {
font-size: 11px;
padding: 5px;
}
.leaflet-marker-pane,
.leaflet-shadow-pane,
.leaflet-tile-pane {
img {
max-width: none;
}
2017-02-11 16:26:57 +00:00
}
img {
2016-12-28 03:21:55 +00:00
&.leaflet-image-layer {
max-width: none;
}
2017-02-11 16:26:57 +00:00
}
2016-12-28 03:21:55 +00:00
.leaflet-overlay-pane {
svg {
max-width: none;
}
}
&.leaflet-touch-zoom {
-ms-touch-action: pan-x pan-y; // sass-lint:disable-line no-vendor-prefixes
touch-action: pan-x pan-y;
}
&.leaflet-touch-drag {
-ms-touch-action: pinch-zoom; // sass-lint:disable-line no-vendor-prefixes
&.leaflet-touch-drag {
-ms-touch-action: none; // sass-lint:disable-line no-vendor-prefixes
touch-action: none;
}
2017-02-11 16:26:57 +00:00
}
.leaflet-control-layers-toggle {
2017-02-26 15:09:23 +00:00
background: $color-white;
border-radius: 50%;
color: $color-black;
display: block;
font-size: 1.6rem;
height: 1.8em;
line-height: 1.95;
margin-right: 16px;
2016-12-28 03:21:55 +00:00
opacity: .9;
2017-02-26 15:09:23 +00:00
text-align: center;
transition: background-color .5s, color .5s;
width: 1.8em;
@media screen and (max-width: map-get($grid-breakpoints, lg) - 1) {
margin-right: -2px;
transform: scale(.8);
}
2017-02-11 16:26:57 +00:00
&::before {
content: '\f229';
2017-02-26 15:09:23 +00:00
font-family: ionicons;
2017-02-11 16:26:57 +00:00
speak: none;
text-rendering: auto;
}
}
2016-12-28 03:21:55 +00:00
.leaflet-control-layers-expanded {
padding: 0;
.leaflet-control-layers-list {
display: block;
position: relative;
}
.leaflet-control-layers-toggle {
display: none;
}
}
}
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow {
user-select: none;
}
///* Safari renders non-retina tile on retina better with this, but Chrome is worse */
.leaflet-safari {
.leaflet-tile {
image-rendering: -webkit-optimize-contrast; // sass-lint:disable-line no-vendor-prefixes
}
///* hack that prevents hw layers "stretching" when loading new tiles */
.leaflet-tile-container {
-webkit-transform-origin: 0 0; // sass-lint:disable-line no-vendor-prefixes
height: 1600px;
width: 1600px;
}
}
.leaflet-marker-icon,
.leaflet-marker-shadow {
display: block;
2017-02-11 16:26:57 +00:00
}
.leaflet-tile {
filter: inherit;
visibility: hidden;
}
.leaflet-tile-loaded {
visibility: inherit;
}
.leaflet-zoom-box {
2016-12-28 03:21:55 +00:00
-moz-box-sizing: border-box; // sass-lint:disable-line no-vendor-prefixes
box-sizing: border-box;
2017-02-11 16:26:57 +00:00
height: 0;
width: 0;
2016-12-28 03:21:55 +00:00
z-index: 800;
2017-02-11 16:26:57 +00:00
}
2016-12-28 03:21:55 +00:00
///* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */
.leaflet-overlay-pane {
z-index: 400;
svg {
-moz-user-select: none; // sass-lint:disable-line no-vendor-prefixes
}
2017-02-11 16:26:57 +00:00
}
2016-12-28 03:21:55 +00:00
.leaflet-pane {
z-index: 400;
2017-02-11 16:26:57 +00:00
}
2016-12-28 03:21:55 +00:00
.leaflet-tile-pane {
z-index: 200;
2017-02-11 16:26:57 +00:00
}
.leaflet-shadow-pane {
2016-12-28 03:21:55 +00:00
z-index: 500;
2017-02-11 16:26:57 +00:00
}
.leaflet-marker-pane {
2016-12-28 03:21:55 +00:00
z-index: 600;
}
.leaflet-tooltip-pane {
z-index: 650;
}
.leaflet-popup-pane {
z-index: 700;
}
.leaflet-map-pane {
canvas {
z-index: 100;
}
svg {
z-index: 200;
}
2017-02-11 16:26:57 +00:00
}
.leaflet-vml-shape {
height: 1px;
width: 1px;
}
2016-12-28 03:21:55 +00:00
.lvml {
display: inline-block;
position: absolute;
}
2017-02-11 16:26:57 +00:00
.leaflet-control {
clear: both;
float: left;
pointer-events: auto;
position: relative;
2016-12-28 03:21:55 +00:00
z-index: 800;
2017-02-11 16:26:57 +00:00
}
.leaflet-top,
.leaflet-bottom {
pointer-events: none;
position: absolute;
z-index: 1000;
}
2016-12-28 03:21:55 +00:00
.leaflet-right {
right: 0;
2017-02-11 16:26:57 +00:00
.leaflet-control {
2016-12-28 03:21:55 +00:00
float: right;
2017-02-11 16:26:57 +00:00
}
}
2016-12-28 03:21:55 +00:00
.leaflet-top {
top: 0;
2017-02-11 16:26:57 +00:00
.leaflet-control {
2016-12-28 03:21:55 +00:00
margin-top: 10px;
2017-02-11 16:26:57 +00:00
}
}
.leaflet-bottom {
bottom: 0;
2016-12-28 03:21:55 +00:00
2017-02-11 16:26:57 +00:00
}
.leaflet-left {
left: 0;
.leaflet-control {
margin-left: 10px;
}
}
.leaflet-fade-anim {
.leaflet-tile {
2016-12-28 03:21:55 +00:00
will-change: opacity;
}
.leaflet-popup {
2017-02-11 16:26:57 +00:00
opacity: 0;
transition: opacity .2s linear;
}
2016-12-28 03:21:55 +00:00
.leaflet-map-pane {
.leaflet-popup {
opacity: 1;
}
2017-02-11 16:26:57 +00:00
}
}
2016-12-28 03:21:55 +00:00
.leaflet-zoom-animated {
transform-origin: 0 0;
2017-02-11 16:26:57 +00:00
}
.leaflet-zoom-anim {
.leaflet-zoom-animated {
transition: transform .25s cubic-bezier(0, 0, .25, 1);
2016-12-28 03:21:55 +00:00
will-change: transform;
2017-02-11 16:26:57 +00:00
}
.leaflet-zoom-hide {
visibility: hidden;
}
2016-12-28 03:21:55 +00:00
2017-02-11 16:26:57 +00:00
}
2016-12-28 03:21:55 +00:00
.leaflet-zoom-anim,
2017-02-11 16:26:57 +00:00
.leaflet-pan-anim {
.leaflet-tile {
2016-12-28 03:21:55 +00:00
transition: none;
2017-02-11 16:26:57 +00:00
}
}
2016-12-28 03:21:55 +00:00
.leaflet-interactive {
cursor: pointer;
}
.leaflet-grab {
cursor: -webkit-grab; // sass-lint:disable-line no-vendor-prefixes
cursor: -moz-grab; // sass-lint:disable-line no-vendor-prefixes no-duplicate-properties
}
.leaflet-crosshair {
&,
&.leaflet-interactive {
cursor: crosshair;
2017-02-11 16:26:57 +00:00
}
}
2016-12-28 03:21:55 +00:00
.leaflet-popup-pane,
.leaflet-control {
cursor: auto;
2017-02-11 16:26:57 +00:00
}
.leaflet-dragging {
2016-12-28 03:21:55 +00:00
.leaflet-marker-draggable,
.leaflet-grab {
&,
&.leaflet-interactive {
cursor: move;
cursor: -webkit-grabbing; // sass-lint:disable-line no-vendor-prefixes no-duplicate-properties
cursor: -moz-grabbing; // sass-lint:disable-line no-vendor-prefixes no-duplicate-properties
}
2017-02-11 16:26:57 +00:00
}
}
2016-12-28 03:21:55 +00:00
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-image-layer,
.leaflet-tile-container {
pointer-events: none;
}
.leaflet-pane > svg {
path {
pointer-events: none;
&.leaflet-interactive {
pointer-events: auto;
}
2017-02-11 16:26:57 +00:00
}
2016-12-28 03:21:55 +00:00
}
2017-02-11 16:26:57 +00:00
2016-12-28 03:21:55 +00:00
.leaflet-marker-icon,
.leaflet-image-layer {
&.leaflet-interactive {
pointer-events: auto;
2017-02-11 16:26:57 +00:00
}
}
.leaflet-control-layers {
&.leaflet-control {
background: transparent;
border: 0;
border-radius: 0;
box-shadow: none;
margin: 0;
opacity: .8;
}
.leaflet-control-layers-list {
display: none;
}
2016-12-28 03:21:55 +00:00
label {
2017-02-11 16:26:57 +00:00
display: block;
}
}
2016-12-28 03:21:55 +00:00
.leaflet-control-layers-scrollbar {
overflow-y: scroll;
padding-right: 5px;
}
2017-02-11 16:26:57 +00:00
.leaflet-control-layers-selector {
display: none;
+ span {
display: block;
padding: 5px 0 8px 20px;
&::before {
border: 1px solid $color-primary;
border-radius: 50%;
content: ' ';
height: 10px;
margin: 0 0 0 -18px;
position: absolute;
transition: background .3s;
width: 10px;
}
&:hover {
&::before {
background: transparentize($color-primary, .7);
}
}
}
&:checked {
+ span {
&::before {
background: $color-primary;
}
}
}
}
2016-12-28 03:21:55 +00:00
.leaflet-tooltip {
background-color: $color-white;
border: 1px solid $color-primary;
border-radius: 2px;
color: $color-primary;
font-size: 12px;
line-height: 1.2;
padding: 6px;
pointer-events: none;
position: absolute;
user-select: none;
white-space: nowrap;
2017-02-11 16:26:57 +00:00
2016-12-28 03:21:55 +00:00
&.leaflet-clickable {
cursor: pointer;
pointer-events: auto;
}
2017-02-11 16:26:57 +00:00
}
2016-12-28 03:21:55 +00:00
.leaflet-tooltip-top,
.leaflet-tooltip-bottom,
.leaflet-tooltip-left,
.leaflet-tooltip-right {
&::before {
background: transparent;
border: 6px solid transparent;
content: '';
pointer-events: none;
position: absolute;
2016-12-28 03:21:55 +00:00
}
}
2016-12-28 03:21:55 +00:00
.leaflet-tooltip-bottom {
margin-top: 6px;
&::before {
border-bottom-color: $color-white;
margin-left: -6px;
margin-top: -12px;
top: 0;
}
}
.leaflet-tooltip-top {
margin-top: -6px;
&::before {
border-top-color: $color-white;
bottom: 0;
margin-bottom: -12px;
}
}
.leaflet-tooltip-bottom,
.leaflet-tooltip-top {
&::before {
left: 50%;
margin-left: -6px;
}
}
.leaflet-tooltip-left {
margin-left: -6px;
&::before {
border-left-color: $color-white;
margin-right: -12px;
right: 0;
}
}
.leaflet-tooltip-right {
margin-left: 6px;
&::before {
border-right-color: $color-white;
left: 0;
margin-left: -12px;
}
}
.leaflet-tooltip-left,
.leaflet-tooltip-right {
&::before {
margin-top: -6px;
top: 50%;
}
}
.leaflet-control-layers-list {
background: transparentize($color-white, .1);
color: $color-gray-dark;
padding: 10px;
label {
cursor: pointer;
}
}
2017-02-26 15:09:23 +00:00
.leaflet-control-zoom {
opacity: .7;
right: 16px;
top: 65px;
@media screen and (max-width: map-get($grid-breakpoints, lg) - 1) {
right: calc(100vw - 50px);
top: -10px;
transform: scale(.8);
}
a {
background: $color-white;
border-radius: 5px 5px 0 0;
color: $color-black;
display: block;
font-size: 40px;
height: 46px;
text-align: center;
transition: background-color .5s, color .5s;
width: 46px;
&:hover {
color: $color-primary;
}
+ a {
border-radius: 0 0 5px 5px;
border-top: 1px solid $color-gray-light;
}
}
}