compass-excess 0.5.3 → 0.5.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0ce838eb9dbb32fd78ff8ea27a94b32266fa7a79
4
- data.tar.gz: 32237037b01bebfa4da2fb7130da991dc6913413
3
+ metadata.gz: 65f40764a89f697d60e8f6b4fbc29645409b581f
4
+ data.tar.gz: f0946b8805a9699f7128a651a1c789d77f1f44e8
5
5
  SHA512:
6
- metadata.gz: 4e3e1c172a88cecb36aa2c3daf521d0b761b746af37c5095262ae84c827fe8662164b413747ed2881d77d4dcfde5f463348005b6296ba02c30d7ee019a3e01da
7
- data.tar.gz: 1f60b7fb805cc31affe45123dbfb583d456d656e2f51691f8e84b34081b620ff0741e3f8977d053839b77eef77ceddbc52544e76d3cc269e6f0b2772f1f3f061
6
+ metadata.gz: c104bdbbc005e582cf975c29a02e18090f2b0b90bcd6bd3749d158001eab03aa4e3ef37d10d7a637135fc2baf24cf7ef07fdba95b504807e7630e0a4027b5602
7
+ data.tar.gz: 7c3146e044d7cefdd5eba4935804ef695133becf6332cf94834dc1a542ba5de7ee02d9ecd4f943a0c73a3d47d08753c3a6857c0b5a9902d991dcdc73c0d68fc8
@@ -1,5 +1,5 @@
1
1
  module Compass
2
2
  module Excess
3
- VERSION = '0.5.3'
3
+ VERSION = '0.5.4'
4
4
  end
5
5
  end
@@ -9,16 +9,32 @@
9
9
  @mixin background-image-file($url, $background-size: null, $background-position: null, $background-repeat: no-repeat, $type: 'png', $retina: true) {
10
10
  @if $url == none {
11
11
  background-image: none;
12
+
12
13
  @if ($retina) {
13
14
  @media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min-device-pixel-ratio: 2), only screen and (-webkit-min-device-pixel-ratio: 3), only screen and (min-device-pixel-ratio: 3) {
14
15
  & { background-image: none; }
15
16
  }
16
17
  }
17
18
  } @else {
18
- @if $retina {
19
- background-image: image-url($url + '@1x.' + $type);
20
- } @else {
19
+
20
+ @if $type == 'svg' {
21
21
  background-image: image-url($url + '.' + $type);
22
+ } @else {
23
+ @if $retina {
24
+ background-image: image-url($url + '@1x.' + $type);
25
+ } @else {
26
+ background-image: image-url($url + '.' + $type);
27
+ }
28
+
29
+ @if ($retina) {
30
+ @media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min-device-pixel-ratio: 2) {
31
+ & { background-image: image-url($url + '@2x.' + $type); }
32
+ }
33
+
34
+ @media only screen and (-webkit-min-device-pixel-ratio: 3), only screen and (min-device-pixel-ratio: 3) {
35
+ & { background-image: image-url($url + '@3x.' + $type); }
36
+ }
37
+ }
22
38
  }
23
39
 
24
40
  @if $background-position {
@@ -29,19 +45,9 @@
29
45
  background-size: $background-size;
30
46
  }
31
47
 
32
- @if ($retina) {
33
- @media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min-device-pixel-ratio: 2) {
34
- & { background-image: image-url($url + '@2x.' + $type); }
35
- }
36
-
37
- @media only screen and (-webkit-min-device-pixel-ratio: 3), only screen and (min-device-pixel-ratio: 3) {
38
- & { background-image: image-url($url + '@3x.' + $type); }
39
- }
40
- }
41
-
42
48
  background-repeat: $background-repeat;
43
49
  }
44
- }
50
+ } // @mixin background-image-file
45
51
 
46
52
  @mixin background-image-gradient($url, $background-image-size, $gradients...) {
47
53
  @include background-image(image-url($url + '@1x.png'), $gradients);
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: compass-excess
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.3
4
+ version: 0.5.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Darlow
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-21 00:00:00.000000000 Z
11
+ date: 2016-08-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: compass