sass-images 0.0.1 → 0.0.2
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 +4 -4
- data/.travis.yml +0 -2
- data/README.md +15 -1
- data/lib/sass/images/functions.rb +1 -1
- data/lib/sass/images/image.rb +1 -1
- data/lib/sass/images/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: dc46425fc14fc38f818d8e0d070667bfb4ba42f9
|
4
|
+
data.tar.gz: 25bd505c926bf550e6ebfed216b63a24c418e9e9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b41b2b1a1dbb8d92d820cafefce14ab59ed08352f4ea5bc8957843dfd6720f89fedd2ac078c421c19b58fc7c9d3966dbb3b1d43358860c5fd860ff5c2fb208af
|
7
|
+
data.tar.gz: 9913447fc7b257d6a14e28b4b475ee6db33591190acd2a4f8f1c1f03fa117666586bd82cd0510cb610693b7224a2749c1b3928152507065734a59aa35c505b77
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -5,7 +5,9 @@
|
|
5
5
|
|
6
6
|
Add this line to your application's Gemfile:
|
7
7
|
|
8
|
-
|
8
|
+
```Ruby
|
9
|
+
gem 'sass-images', github: 'codegram/sass-images'
|
10
|
+
```
|
9
11
|
|
10
12
|
And then execute:
|
11
13
|
|
@@ -21,6 +23,18 @@ Right now it includes:
|
|
21
23
|
* `image-height($path)`: Returns the height (px) of an image
|
22
24
|
* `inline-image($path)`: Returns an inlined Data URI scheme of an image
|
23
25
|
|
26
|
+
### Example
|
27
|
+
|
28
|
+
```sass
|
29
|
+
h1.logo a
|
30
|
+
display: block
|
31
|
+
text-indent: -999em
|
32
|
+
overflow: hidden
|
33
|
+
width: image-width('logo.png')
|
34
|
+
height: image-height('logo.png')
|
35
|
+
background-image: inline-image('logo.png')
|
36
|
+
```
|
37
|
+
|
24
38
|
## Contributing
|
25
39
|
|
26
40
|
1. Fork it
|
@@ -17,7 +17,7 @@ module Sass::Images
|
|
17
17
|
def inline_image(path)
|
18
18
|
image = Image.new(resolve_path path)
|
19
19
|
data_uri = "data:#{image.content_type};base64,#{image.base64}"
|
20
|
-
Sass::Script::String.new "url(#{data_uri})"
|
20
|
+
Sass::Script::String.new "url(#{data_uri})"
|
21
21
|
end
|
22
22
|
|
23
23
|
private
|
data/lib/sass/images/image.rb
CHANGED
data/lib/sass/images/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sass-images
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josep Jaume Rey Peroy
|
@@ -141,7 +141,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
141
141
|
version: '0'
|
142
142
|
requirements: []
|
143
143
|
rubyforge_project:
|
144
|
-
rubygems_version: 2.0.
|
144
|
+
rubygems_version: 2.0.3
|
145
145
|
signing_key:
|
146
146
|
specification_version: 4
|
147
147
|
summary: A sass helper that knows how to deal with images
|