Skip to content

Commit

Permalink
Geomap: Converting 'Locate' images to sprite
Browse files Browse the repository at this point in the history
  • Loading branch information
LaurentGoderre committed Sep 19, 2014
1 parent 969f53d commit ff033d8
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 17 deletions.
9 changes: 8 additions & 1 deletion Gruntfile.coffee
Expand Up @@ -521,9 +521,16 @@ module.exports = (grunt) ->
src: [
"src/plugins/share/sprites/*.png"
]
css: "src/plugins/share/sprites/_sprites.scss"
css: "src/plugins/share/sprites/_sprites_share.scss"
map: "src/plugins/share/assets/sprites_share.png"
output: "scss"
geomap:
src: [
"src/plugins/geomap/sprites/*.png"
]
css: "src/plugins/geomap/sprites/_sprites_geomap.scss"
map: "src/plugins/geomap/assets/sprites_geomap.png"
output: "scss"

# Compiles the Sass files
sass:
Expand Down
1 change: 1 addition & 0 deletions src/base/ie8-wet-boew.scss
Expand Up @@ -9,6 +9,7 @@
/*
Plugins
*/
@import "../plugins/geomap/ie8";
@import "../plugins/lightbox/ie8";
@import "../plugins/overlay/ie8";
@import "../plugins/tables/ie8";
Expand Down
19 changes: 12 additions & 7 deletions src/plugins/geomap/_base.scss
Expand Up @@ -2,6 +2,8 @@
* Web Experience Toolkit (WET) / Boîte à outils de l'expérience Web (BOEW)
* wet-boew.github.io/wet-boew/License-eng.html / wet-boew.github.io/wet-boew/Licence-fra.html
*/
@import "sprites/sprites_geomap";

%geomap-overflow-cursor-move {
cursor: move;
}
Expand All @@ -13,6 +15,10 @@
position: absolute;
}

%geomap-locate-bg-size {
background-size: 33px auto;
}

/**
* Openlayer pan zoom bar button
*/
Expand Down Expand Up @@ -58,15 +64,14 @@
}

.olButtonGeolocateItemActive {
background: url("../assets/locate-active.png") no-repeat;
background-position: 0 0;
background-size: 33px 33px;
@extend %_sprites_geomap_scss;
@extend %geomap-locate-bg-size;
}

.olButtonGeolocateItemInactive {
background: url("../assets/locate.png") no-repeat;
background-position: 0 0;
background-size: 33px 33px;
@extend %_sprites_geomap_scss;
@extend %geomap-locate-bg-size;
background-position: 0 -34px;
}

/*
Expand Down Expand Up @@ -283,7 +288,7 @@
}

.geomap-lgnd-layer {
margin-top: 20px!important;
margin-top: 20px!important;
}

.geomap-geoloc {
Expand Down
20 changes: 12 additions & 8 deletions src/plugins/geomap/_ie8.scss
Expand Up @@ -2,15 +2,19 @@
* Web Experience Toolkit (WET) / Boîte à outils de l'expérience Web (BOEW)
* wet-boew.github.io/wet-boew/License-eng.html / wet-boew.github.io/wet-boew/Licence-fra.html
*/
.ie8 {
div {
&.olControlZoom {
a {
&:hover,
&:focus {
background: #130085;
}
@import "sprites/sprites_geomap";

.lt-ie9 {
.olControlZoom {
a {
&:hover,
&:focus {
background: #130085;
}
}
}

.olButtonGeolocateItemInactive {
@extend %locate;
}
}
File renamed without changes
File renamed without changes
2 changes: 1 addition & 1 deletion src/plugins/share/_base.scss
Expand Up @@ -2,7 +2,7 @@
* Web Experience Toolkit (WET) / Boîte à outils de l'expérience Web (BOEW)
* wet-boew.github.io/wet-boew/License-en.html / wet-boew.github.io/wet-boew/Licence-fr.html
*/
@import "sprites/sprites";
@import "sprites/sprites_share";

.shr-opn {
span {
Expand Down

0 comments on commit ff033d8

Please sign in to comment.