sass-images 0.0.1 → 0.0.2

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: 4cec2f538cf81ce0bcac31b4fb0f93c0fe04bdc1
4
- data.tar.gz: 2c60f1a19a7b764ac75061810857a2b47f8eeff1
3
+ metadata.gz: dc46425fc14fc38f818d8e0d070667bfb4ba42f9
4
+ data.tar.gz: 25bd505c926bf550e6ebfed216b63a24c418e9e9
5
5
  SHA512:
6
- metadata.gz: d19efd65bae2486a0ea76e8df3a9dee681bd67408e6db1285565fd5d52087226abc1a90430e575df0bab5b4a2a0b74a44fee838d0d0a20cc4a3c1e56e2adecc1
7
- data.tar.gz: e9955b7c138f11f5ed5a0364b011a5aab1580ce5c63de2ce1d6465634dcf20f8ce4f3177b095fe5c85d75085240e0093e7076d7f724509c4b266227338fc5035
6
+ metadata.gz: b41b2b1a1dbb8d92d820cafefce14ab59ed08352f4ea5bc8957843dfd6720f89fedd2ac078c421c19b58fc7c9d3966dbb3b1d43358860c5fd860ff5c2fb208af
7
+ data.tar.gz: 9913447fc7b257d6a14e28b4b475ee6db33591190acd2a4f8f1c1f03fa117666586bd82cd0510cb610693b7224a2749c1b3928152507065734a59aa35c505b77
@@ -1,7 +1,5 @@
1
1
  rvm:
2
2
  - 1.9.3
3
3
  - 2.0.0
4
- - rbx-18mode
5
4
  - rbx-19mode
6
5
  - jruby-19mode
7
- - jruby-18mode
data/README.md CHANGED
@@ -5,7 +5,9 @@
5
5
 
6
6
  Add this line to your application's Gemfile:
7
7
 
8
- gem 'sass-images', github: 'codegram/sass-images'
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})", :string
20
+ Sass::Script::String.new "url(#{data_uri})"
21
21
  end
22
22
 
23
23
  private
@@ -3,7 +3,7 @@ require 'base64'
3
3
 
4
4
  class Sass::Images::Image
5
5
  def initialize(path)
6
- @path = path
6
+ @path = path.to_s
7
7
  end
8
8
 
9
9
  def width
@@ -1,5 +1,5 @@
1
1
  module Sass
2
2
  module Images
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
4
4
  end
5
5
  end
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.1
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.2
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