svgeez 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -3
- data/lib/svgeez/sprite_builder.rb +1 -1
- data/lib/svgeez/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6902a2d266e64ff5d2c933024386e1be9c1b868d
|
4
|
+
data.tar.gz: 2bee64144cbda271d538ce30fd544f866df4fbc4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e1387590cf3812dd3dad9b062d636e9796b03ab28715e5e4360123b9128265aeaba137a1b552a80c14990a0f48abe79492f29a906a188ac22bfbb57b7f540eb5
|
7
|
+
data.tar.gz: b24122bd496f1787691411b3d72c3892ac3b139374fed7f0588e10a2e603e28b65ab02b736a3c4b02641503ecd504aceb55840e7e935eb0613157cc2204176b9
|
data/README.md
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
**A Ruby gem for automatically generating an SVG sprite from a folder of SVG icons.**
|
4
4
|
|
5
|
+
[![Gem Version](https://badge.fury.io/rb/svgeez.svg)](https://badge.fury.io/rb/svgeez)
|
5
6
|
[![Build Status](https://travis-ci.org/jgarber623/svgeez.svg?branch=master)](https://travis-ci.org/jgarber623/svgeez)
|
6
7
|
|
7
8
|
If you're using an [SVG](https://en.wikipedia.org/wiki/Scalable_Vector_Graphics) icon system in your Web projects, svgeez can help speed up your workflow by automating the SVG sprite generation process. Simply run svgeez alongside your existing project (or integrate it into your current build system); add, edit, or delete SVG files from a directory; and marvel as svgeez generates a single SVG sprite file ready for inclusion in your user interface.
|
@@ -85,14 +86,14 @@ Within generated SVG sprite files, each icon is wrapped in a `<symbol>` element
|
|
85
86
|
For example, a file named `menu.svg` in `~/Sites/sixtwothree.org/images/icons` will be assigned an `id` value of `icons-menu`.
|
86
87
|
|
87
88
|
```svg
|
88
|
-
<symbol
|
89
|
+
<symbol id="icons-menu" viewBox="0 0 32 32">
|
89
90
|
<path d="…"/>
|
90
91
|
</symbol>
|
91
92
|
```
|
92
93
|
|
93
94
|
### Markup
|
94
95
|
|
95
|
-
To use an svgeez-generated SVG sprite file, first include the file's contents at the top of your HTML page, just after
|
96
|
+
To use an svgeez-generated SVG sprite file, first include the file's contents at the top of your HTML page, just after the opening `<body>` element.
|
96
97
|
|
97
98
|
In a Rails 4 application:
|
98
99
|
|
@@ -135,7 +136,7 @@ For smaller icon sets, this may be an acceptable balance of user and developer n
|
|
135
136
|
|
136
137
|
### Styling embedded icons
|
137
138
|
|
138
|
-
Icons embedded with the inline `<use>` technique will inherit their fill color from the nearest parent's `color` value
|
139
|
+
Icons embedded with the inline `<use>` technique will inherit their fill color from the nearest parent's `color` value, but this can be overriden with CSS:
|
139
140
|
|
140
141
|
```css
|
141
142
|
button {
|
@@ -41,7 +41,7 @@ module Svgeez
|
|
41
41
|
pattern = /^<svg.*?(?<viewbox>viewBox=".*?").*?>(?<content>.*?)<\/svg>$/m
|
42
42
|
|
43
43
|
file_contents.match(pattern) do |matches|
|
44
|
-
output_file_contents << %{<symbol
|
44
|
+
output_file_contents << %{<symbol id="#{source_basename}-#{File.basename(file_path, '.svg').downcase}" #{matches[:viewbox]}>#{matches[:content]}</symbol>}
|
45
45
|
end
|
46
46
|
end
|
47
47
|
|
data/lib/svgeez/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: svgeez
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jason Garber
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-11-
|
11
|
+
date: 2015-11-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: listen
|