svg_sprite 0.1.1 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ece2edc0ee57a16a3be26fbee5c14a7dfec7543f
4
- data.tar.gz: e8768667775ac396d65847de4501fb2ff9521b8b
3
+ metadata.gz: c809954c826e615c638d11c6e5d45ca4c1433324
4
+ data.tar.gz: 2a621741fbca458404d7c788dd8a2e41fe57445f
5
5
  SHA512:
6
- metadata.gz: 666f6801f1b8af0020631934647a1d509fc53a4a4d5875076569229d18878f0f735ff3d676fa98b544ae08124d4751ee5eeceba256fd133b2c1ae56f37cbd0f5
7
- data.tar.gz: 14922c07b23583d3e1c5306fdd217002498ffa4c41f9493c78d37cac4d7c2194a8632557c05791be3b65980ef018a764251b2cbe91a0b13876b8d95054e4ddd0
6
+ metadata.gz: ee627aee4e0a4d3bb5f2e89a17117a7443d7092f73bd2f91149e741808c7c7a701487ed0509a569a4b208ff4823f3799712229216b3cf6b19e2f2ab85398c0a2
7
+ data.tar.gz: 55a3a77f109683caab3e6ea155079f2fc9c00614216688170f027df6ec4b472045417e81fd4fc338341c86b22c476182cd7115c7d07bcaa147f249c0b4898063
@@ -1,5 +1,14 @@
1
1
  // Generated by sprite_svg v<%= SvgSprite::VERSION %> at <%= Time.now %>
2
2
  $<%= options[:name] %>-names: (<%= names(source) %>);
3
+ $<%= options[:name] %>-urls: (
4
+ <%- for svg in source -%>
5
+ <%= svg.name %>: "<%= svg.data_uri %>",
6
+ <%- end -%>
7
+ );
8
+
9
+ @function <%= options[:name] %>-url($name) {
10
+ @return map-get($<%= options[:name] %>-urls, $name);
11
+ }
3
12
 
4
13
  @mixin <%= options[:name] %>-before($name) {
5
14
  &:before {
@@ -15,7 +24,7 @@ $<%= options[:name] %>-names: (<%= names(source) %>);
15
24
 
16
25
  <% for svg in source %>
17
26
  %<%= options[:name] %>-<%= svg.name %> {
18
- background-image: url(<%= svg.data_uri %>);
27
+ background-image: url(<%= options[:name] %>-url("<%= svg.name %>"));
19
28
  <%- if svg.has_dimensions? -%>
20
29
  width: <%= svg.width %>;
21
30
  height: <%= svg.height %>;
@@ -1,3 +1,3 @@
1
1
  module SvgSprite
2
- VERSION = "0.1.1"
2
+ VERSION = "0.2.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: svg_sprite
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nando Vieira
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-12-29 00:00:00.000000000 Z
11
+ date: 2016-03-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: svg_optimizer