sass-extras 0.0.1 → 1.0.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: ac5519a8b4bf64a198c1df9c394825961d3f4662
4
- data.tar.gz: 7e8ca39eab7f6200859cd754cd7acfc59227bd31
3
+ metadata.gz: b711f4aaeb28ea16e332fb9102596127e770453e
4
+ data.tar.gz: c15e122d4f2dc13990c315a713f281ef28965f94
5
5
  SHA512:
6
- metadata.gz: a3c396ea1377ad290e2bddf47ad0f17c3c8cb77f14cca7be94376a88e8bcf935777af5d3d99046691759c250a608fcf1682b91f17effa06233d5b2431d96bdd8
7
- data.tar.gz: bda6b6651d35c787f57d5b0f8e7cbed500c5c6479fd5cd22c6a601ff6516713980b61755a185baa72b924724adf2cc5b0638c780c9d89a5eb0de6dfe4839cfee
6
+ metadata.gz: 2b7f254ca19ce3aaeac57addda82a981196c732fdc000e94cf874ec02decb7fa1f4c9b51975becc64733bc8a7ffeabd226361443f3fd9f70a57592e5a674bcfc
7
+ data.tar.gz: 1b760ea3d09b26f1bb398772f0f460a7751443f9418ce71eb9bc7bf04a76560e5238f4d5a103662262f3782ea0c6f70f8412602ebe6785c9ee27609c5d56472d
@@ -3,12 +3,23 @@ require "rack"
3
3
 
4
4
  module Sass
5
5
  module Extras
6
- module SvgGradients
6
+ module SvgDataUrls
7
7
  def self.included(base)
8
+ base.declare :circle_image_data_url, [:color, :radius]
8
9
  base.declare :linear_gradient_image_data_url, [:color, :height]
9
10
  base.declare :radial_gradient_image_data_url, [:color, :height]
10
11
  end
11
12
 
13
+ def circle_image_data_url(color = Sass::Script::Color.new([0, 0, 0]), radius = Sass::Script::Number.new(10))
14
+ assert_type color, :Color
15
+ assert_type radius, :Number
16
+ svg_data_url(<<-SVG)
17
+ <svg xmlns="http://www.w3.org/2000/svg">
18
+ <circle cx="#{radius}" cy="#{radius}" r="#{radius}" fill="#{svg_color(color)}"/>
19
+ </svg>
20
+ SVG
21
+ end
22
+
12
23
  def radial_gradient_image_data_url(color = Sass::Script::Color.new([0, 0, 0]), height = Sass::Script::Number.new(5))
13
24
  assert_type color, :Color
14
25
  assert_type height, :Number
@@ -1,5 +1,5 @@
1
1
  module Sass
2
2
  module Extras
3
- VERSION = "0.0.1"
3
+ VERSION = "1.0.0"
4
4
  end
5
5
  end
data/lib/sass/extras.rb CHANGED
@@ -2,7 +2,7 @@ require "sass"
2
2
  require "sass/extras/version"
3
3
  require "sass/extras/contrast"
4
4
  require "sass/extras/inline_color_image"
5
- require "sass/extras/svg_gradients"
5
+ require "sass/extras/svg_data_urls"
6
6
  require "sass/extras/yuv"
7
7
 
8
8
  module Sass
@@ -15,7 +15,7 @@ module Sass
15
15
  module Functions
16
16
  include Sass::Extras::Contrast::Functions
17
17
  include Sass::Extras::InlineColorImage
18
- include Sass::Extras::SvgGradients
18
+ include Sass::Extras::SvgDataUrls
19
19
  include Sass::Extras::YUV::Functions
20
20
  end
21
21
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sass-extras
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tobias Haagen Michaelsen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-14 00:00:00.000000000 Z
11
+ date: 2015-02-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sass
@@ -111,7 +111,7 @@ files:
111
111
  - lib/sass/extras.rb
112
112
  - lib/sass/extras/contrast.rb
113
113
  - lib/sass/extras/inline_color_image.rb
114
- - lib/sass/extras/svg_gradients.rb
114
+ - lib/sass/extras/svg_data_urls.rb
115
115
  - lib/sass/extras/version.rb
116
116
  - lib/sass/extras/yuv.rb
117
117
  - sass-extras.gemspec
@@ -138,7 +138,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
138
138
  version: '0'
139
139
  requirements: []
140
140
  rubyforge_project:
141
- rubygems_version: 2.2.0
141
+ rubygems_version: 2.4.5
142
142
  signing_key:
143
143
  specification_version: 4
144
144
  summary: A collection of SASS extensions.