victor 0.1.3 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +17 -0
- data/lib/victor/css.rb +4 -0
- data/lib/victor/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: 3333d626e4dc11a717da2f915ead15331fae87c0
|
4
|
+
data.tar.gz: 562d059c2c3596c1f7f890554459f821b0714cdf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5e1c3fc3bb74ffab341c3b572c286a15493a4a32136f1c9169b8c155cc0c2ef0218008fd3fdedf517d82d40123ae80fbff7f765a06f34734fce761b1c0ea0304
|
7
|
+
data.tar.gz: 9537eb2500737b43fa4cb6ea8192d9f67e5828045f184a7352f16da7fd8795d8a53823285ec4e16b4c53eb44592e882515c780b1252e2b18420b0dbb45a67243
|
data/README.md
CHANGED
@@ -234,6 +234,23 @@ svg.css = {
|
|
234
234
|
Underscore characters will be converted to dashes (`stroke_width` becomes
|
235
235
|
`stroke-width`).
|
236
236
|
|
237
|
+
|
238
|
+
If you need to add CSS statements , like `@import`, use the following syntax:
|
239
|
+
|
240
|
+
```ruby
|
241
|
+
css['@import'] = [
|
242
|
+
"url('https://fonts.googleapis.com/css?family=Audiowide')",
|
243
|
+
"url('https://fonts.googleapis.com/css?family=Pacifico')"
|
244
|
+
]
|
245
|
+
```
|
246
|
+
|
247
|
+
When the value of the CSS attribute is an array, Victor will simply use
|
248
|
+
the values of the array and prefix each of them with the key, so the above
|
249
|
+
will result in two `@import url(...)` rows.
|
250
|
+
|
251
|
+
See the [custom fonts example](https://github.com/DannyBen/victor/tree/master/examples#12-custom-fonts)
|
252
|
+
|
253
|
+
|
237
254
|
---
|
238
255
|
|
239
256
|
[examples]: https://github.com/DannyBen/victor/tree/master/examples#examples
|
data/lib/victor/css.rb
CHANGED
@@ -23,6 +23,10 @@ module Victor
|
|
23
23
|
result.push " " * indent + "#{key} {"
|
24
24
|
result.push convert_hash(value, indent+2)
|
25
25
|
result.push " " * indent + "}"
|
26
|
+
elsif value.is_a? Array
|
27
|
+
value.each do |row|
|
28
|
+
result.push " " * indent + "#{key} #{row};"
|
29
|
+
end
|
26
30
|
else
|
27
31
|
result.push " " * indent + "#{key}: #{value};"
|
28
32
|
end
|
data/lib/victor/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: victor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Danny Ben Shitrit
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-02-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: runfile
|