compass-retina-sprites 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -61,6 +61,10 @@ $hover-class : 'sp-hover';
61
61
 
62
62
  $sprite : sprite-map( "#{$sprite-name}/*.png" );
63
63
  $sprite-ret : sprite-map( "#{$sprite-name}2x/*.png" );
64
+ $webp : str-replace(sprite-url($sprite), '.png', '.webp');
65
+ $webp-url : str-replace($webp, 'images', 'images-webp');
66
+ $webp-ret : str-replace(sprite-url($sprite-ret), '.png', '.webp');
67
+ $webp-url-ret : str-replace($webp-ret, 'images', 'images-webp');
64
68
 
65
69
  .sp-#{$sprite-name} {
66
70
  background : $sprite;
@@ -72,13 +76,13 @@ $hover-class : 'sp-hover';
72
76
  background : $sprite-ret;
73
77
  }
74
78
  .webpalpha & {
75
- background : url(str-replace(sprite-url($sprite), '.png', '.webp')) no-repeat;
79
+ background : url($webp-url) no-repeat;
76
80
  @media (
77
81
  -webkit-min-device-pixel-ratio: 1.5 ),
78
82
  ( min--moz-device-pixel-ratio: 3/2 ),
79
83
  ( min-resolution: 1.5dppx ),
80
84
  ( min-resolution: 192dpi ) {
81
- background : url(str-replace(sprite-url($sprite), '.png', '.webp')) no-repeat;
85
+ background : url($webp-url-ret) no-repeat;
82
86
  }
83
87
  }
84
88
  }
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 1
9
- version: 0.1.1
8
+ - 2
9
+ version: 0.1.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Tingan Ho