Skip to content

Commit

Permalink
Fix background rotation hovering (#8367)
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez authored and mourner committed Jun 24, 2019
1 parent 500320f commit 87ed741
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions src/css/mapbox-gl.css
Original file line number Diff line number Diff line change
Expand Up @@ -135,31 +135,35 @@
background-image: svg-load('svg/mapboxgl-ctrl-zoom-in.svg');
}

.mapboxgl-ctrl-icon.mapboxgl-ctrl-geolocate {
.mapboxgl-ctrl-icon.mapboxgl-ctrl-geolocate::before {
background-image: svg-load('svg/mapboxgl-ctrl-geolocate.svg', fill=#333);
content: "";
display: block;
width: 100%;
height: 100%;
}

.mapboxgl-ctrl-icon.mapboxgl-ctrl-geolocate:disabled {
.mapboxgl-ctrl-icon.mapboxgl-ctrl-geolocate::before:disabled {
background-image: svg-load('svg/mapboxgl-ctrl-geolocate.svg', fill=#aaa);
}

.mapboxgl-ctrl-icon.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-active {
.mapboxgl-ctrl-icon.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-active::before {
background-image: svg-load('svg/mapboxgl-ctrl-geolocate.svg', fill=#33b5e5);
}

.mapboxgl-ctrl-icon.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-active-error {
.mapboxgl-ctrl-icon.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-active-error::before {
background-image: svg-load('svg/mapboxgl-ctrl-geolocate.svg', fill=#e58978);
}

.mapboxgl-ctrl-icon.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-background {
.mapboxgl-ctrl-icon.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-background::before {
background-image: svg-load('svg/mapboxgl-ctrl-geolocate-background.svg', fill=#33b5e5);
}

.mapboxgl-ctrl-icon.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-background-error {
.mapboxgl-ctrl-icon.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-background-error::before {
background-image: svg-load('svg/mapboxgl-ctrl-geolocate-background.svg', fill=#e54e33);
}

.mapboxgl-ctrl-icon.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-waiting {
.mapboxgl-ctrl-icon.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-waiting::before {
-webkit-animation: mapboxgl-spin 2s infinite linear;
-moz-animation: mapboxgl-spin 2s infinite linear;
-o-animation: mapboxgl-spin 2s infinite linear;
Expand Down

0 comments on commit 87ed741

Please sign in to comment.