compass_sumo 0.4.1 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ODEzZGVjNDNmZmUwMTA5Mjg1YzgxNjRjYjhiYzMyNGQ0YTNmZWQzMA==
4
+ MTY0NjA5MDMwMDVlZTU4NjgxNjkwNjU0ZmE3NmYxNmYwNGM5ZDExNQ==
5
5
  data.tar.gz: !binary |-
6
- YTIwNzkxMjdkOTJhZWFhODc1ZWExMjA1ZDY3NGZkMjYxMDNlNGM0Ng==
6
+ NDYxYjYwNWQ0ZjdjNWRkYjkxZmE1Y2M2M2I2MWQ5YTcxODlhODlhZQ==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- ZjgwNzM0MDJlY2VhOGQ5ZTc5ZWU2MmI2MDZlNjY2ZWI3MjZjN2YwN2E5YzUz
10
- YzFlMWIzZDhiODdjZmVjOGVjNjdiMzQxNjU4ZWQ2ZmM2MzU3YzEyODgzZDk1
11
- Mzk5NmMyMTdmYTNlMjFhYjM4OTViMmJkMzY4NWEyZWY2OTNjNmQ=
9
+ NGVhNzgzNDFhZmVhMTRmOTJhMzkxYTg0ZTg4ZDUxNjhkZjgxMmNjNjE1NGIz
10
+ M2JjZjU0MzM0ZDBlYzJmZDgzY2Q4MTkwNDhhYzRmMGFmODQzNmZkN2NiM2Nj
11
+ M2VkYTg3Mzc5ZDExNThhNmZiNDg4ZjM3ODQwZGE4NTI2YWNkYjA=
12
12
  data.tar.gz: !binary |-
13
- M2U1OWJmMjI0NjhkYTJhNTE2ZjdiMTE5Mzc4NmUyMDVmNWJjYzZkZWQ0ODM4
14
- ZDllY2Y2OGU2MWFkZjQwNzgxZmE3ODlmZmQ0Yjg0ZGY2NGQ4ZTYzNDc3ZWJj
15
- ZTVhOWIzMjVlMTVmMGFhZjBlZDk1Mzg4M2I4OGNmZmNiMzc4MTE=
13
+ MDE2NjdhMzMxOTZkZWJiYzQ2YTBhY2RmZTk0OGJjYmFjNGIzNGIwZDBiNzNj
14
+ MTE5ZmE5YzVhMGEzYmNlOGVkMGMwMWMzYWQxZmUwNDFjNzFlNWJhYmFiMDBk
15
+ NTc2OWEwZDY1YjhkY2RhMTQwNTgwOWRjMzMwM2UxMjUzYzAwOTc=
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -1,3 +1,3 @@
1
1
  module CompassSumo
2
- VERSION = "0.4.1"
2
+ VERSION = "0.4.2"
3
3
  end
@@ -19,32 +19,62 @@
19
19
  $defaultSvgFallbackClass: 'no-svg' !default;
20
20
  $defaultInlineSvgs: true !default;
21
21
 
22
+ @mixin generate-svg-background-image(
23
+ $name,
24
+ $backgroundOptions: null,
25
+ $fallbackClass: $defaultSvgFallbackClass,
26
+ $inline: $defaultInlineSvgs,
27
+ $dimensions: true,
28
+ $hover: false
29
+ ) {
30
+ $svgImage: "#{$name}.svg" !default;
31
+ $pngImage: "#{$name}.png" !default;
32
+
33
+ @if ($inline) {
34
+ @include background(inline-image($svgImage) #{$backgroundOptions});
35
+ background-size: image-width($pngImage) auto;
36
+ } @else {
37
+ @include background(image-url($svgImage) #{$backgroundOptions});
38
+ background-size: image-width($pngImage) auto;
39
+ }
40
+
41
+ @if ($dimensions) {
42
+ width: image-width($pngImage);
43
+ height: image-height($pngImage);
44
+ }
45
+
46
+ @include fallback($fallbackClass) {
47
+ @include background(image-url($pngImage) #{$backgroundOptions})
48
+ }
49
+ }
50
+
22
51
  // Setup a SVG background with PNG fallback
23
52
  @mixin svg-with-png-fallback($name, $backgroundOptions: null,
24
- $svgImage: null,
25
- $pngImage: null,
26
53
  $fallbackClass: $defaultSvgFallbackClass,
27
54
  $inline: $defaultInlineSvgs,
28
- $dimensions: true
55
+ $dimensions: true,
56
+ $hover: false
29
57
  ) {
30
58
 
31
- $svgImage: "#{$name}.svg" !default;
32
- $pngImage: "#{$name}.png" !default;
59
+ @include generate-svg-background-image(
60
+ $name: $name,
61
+ $backgroundOptions: $backgroundOptions,
62
+ $fallbackClass: $fallbackClass,
63
+ $inline: $inline,
64
+ $dimensions: $dimensions,
65
+ $hover: $hover
66
+ );
33
67
 
34
- @if ($inline) {
35
- @include background(inline-image($svgImage) #{$backgroundOptions});
36
- background-size: image-width($pngImage) auto;
37
- } @else {
38
- @include background(image-url($svgImage) #{$backgroundOptions});
39
- background-size: image-width($pngImage) auto;
40
- }
41
-
42
- @if ($dimensions) {
43
- width: image-width($pngImage);
44
- height: image-height($pngImage);
45
- }
46
-
47
- @include fallback($fallbackClass) {
48
- @include background(image-url($pngImage) #{$backgroundOptions})
49
- }
68
+ @if ($hover) {
69
+ &:hover {
70
+ @include generate-svg-background-image(
71
+ "#{$name}_hover",
72
+ $backgroundOptions: $backgroundOptions,
73
+ $fallbackClass: $fallbackClass,
74
+ $inline: $inline,
75
+ $dimensions: $dimensions,
76
+ $hover: false
77
+ );
78
+ }
79
+ }
50
80
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: compass_sumo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan De Poorter
@@ -39,7 +39,7 @@ cert_chain:
39
39
  UzZSM2QzWQpFdlVIWS9tcmZNY3NYUWJ3aVdXeFBzL2R6TDhSbFhFcGhZeDlz
40
40
  N0VyUk11ck9GUm5ZZ3dDZ0E9PQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0t
41
41
  Cg==
42
- date: 2013-07-12 00:00:00.000000000 Z
42
+ date: 2013-11-18 00:00:00.000000000 Z
43
43
  dependencies:
44
44
  - !ruby/object:Gem::Dependency
45
45
  name: compass
metadata.gz.sig CHANGED
@@ -1,2 +1 @@
1
- i+�&M j���4�ÿ��doq& D�ȡ�hI��ڸ�䞦�4�9d���hI��Ӟ�vTr����jRʳ2���1Y�Ԋ� �HaO?�A�tet��>�?BC�#��5���?c~i�|���y��;s^a��4+�xg����?v�R[W�3[�2/H�
2
- �(���:Or���lTv׿Tܡ��pe�͇�Z�3�Jvu�@��d��q�)�q:TY��ait�Ѫ$�ij C�G��#(�įn�Xn~�h_�
1
+ �̮�YmSוpV&4v.���3���밞�"��i�����<z%001mGEf��J�ŭ�R� ^OBea~�Ȍ�!p����e��y�ZnD�(�Q�Vy*t%�`c%=%���y���.�R��eۻ���N3>�i�oX������=�� �I*ٜv� Oˆ`v�ذ���gL,�H�����)�>��F��� ���hc3m�Hy�M�����*؅z�����2r���b�������N�WD�A�K���A�