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 +4 -4
- data/lib/sass/extras/{svg_gradients.rb → svg_data_urls.rb} +12 -1
- data/lib/sass/extras/version.rb +1 -1
- data/lib/sass/extras.rb +2 -2
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b711f4aaeb28ea16e332fb9102596127e770453e
|
4
|
+
data.tar.gz: c15e122d4f2dc13990c315a713f281ef28965f94
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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
|
data/lib/sass/extras/version.rb
CHANGED
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/
|
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::
|
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
|
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:
|
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/
|
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.
|
141
|
+
rubygems_version: 2.4.5
|
142
142
|
signing_key:
|
143
143
|
specification_version: 4
|
144
144
|
summary: A collection of SASS extensions.
|