sass 3.3.0.alpha.138 → 3.3.0.alpha.141
Sign up to get free protection for your applications and to get access to all the features.
- data/REVISION +1 -1
- data/VERSION +1 -1
- data/VERSION_DATE +1 -1
- data/lib/sass/exec.rb +1 -3
- data/lib/sass/script/functions.rb +13 -0
- data/test/sass/functions_test.rb +6 -0
- metadata +3 -3
data/REVISION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
a4b3fa2126c0f4460a64e02a7912d7f50ec4d99f
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.3.0.alpha.
|
1
|
+
3.3.0.alpha.141
|
data/VERSION_DATE
CHANGED
@@ -1 +1 @@
|
|
1
|
-
10 May 2013
|
1
|
+
10 May 2013 23:58:19 GMT
|
data/lib/sass/exec.rb
CHANGED
@@ -329,7 +329,6 @@ END
|
|
329
329
|
begin
|
330
330
|
input = @options[:input]
|
331
331
|
output = @options[:output]
|
332
|
-
sourcemap = @options[:sourcemap]
|
333
332
|
|
334
333
|
@options[:for_engine][:syntax] ||= :scss if input.is_a?(File) && input.path =~ /\.scss$/
|
335
334
|
@options[:for_engine][:syntax] ||= @default_syntax
|
@@ -345,7 +344,7 @@ END
|
|
345
344
|
|
346
345
|
input.close() if input.is_a?(File)
|
347
346
|
|
348
|
-
if sourcemap
|
347
|
+
if @options[:sourcemap]
|
349
348
|
relative_sourcemap_path = Pathname.new(@options[:sourcemap_filename]).
|
350
349
|
relative_path_from(Pathname.new(@options[:output_filename]).dirname)
|
351
350
|
rendered, mapping = engine.render_with_sourcemap(relative_sourcemap_path.to_s)
|
@@ -362,7 +361,6 @@ END
|
|
362
361
|
raise e.sass_backtrace_str("standard input")
|
363
362
|
ensure
|
364
363
|
output.close if output.is_a? File
|
365
|
-
sourcemap.close if sourcemap.is_a? File
|
366
364
|
end
|
367
365
|
end
|
368
366
|
|
@@ -1639,6 +1639,19 @@ module Sass::Script
|
|
1639
1639
|
end
|
1640
1640
|
declare :if, [:condition, :if_true, :if_false]
|
1641
1641
|
|
1642
|
+
# This function only exists as a workaround for IE7's [`content:counter`
|
1643
|
+
# bug][bug]. It works identically to any other plain-CSS function, except it
|
1644
|
+
# avoids adding spaces between the argument commas.
|
1645
|
+
#
|
1646
|
+
# [bug]: http://jes.st/2013/ie7s-css-breaking-content-counter-bug/
|
1647
|
+
#
|
1648
|
+
# @example
|
1649
|
+
# counter(item, ".") => counter(item,".")
|
1650
|
+
def counter(*args)
|
1651
|
+
Sass::Script::String.new("counter(#{args.map {|a| a.to_s(options)}.join(',')})")
|
1652
|
+
end
|
1653
|
+
declare :counter, [], :var_args => true
|
1654
|
+
|
1642
1655
|
private
|
1643
1656
|
|
1644
1657
|
# This method implements the pattern of transforming a numeric value into
|
data/test/sass/functions_test.rb
CHANGED
@@ -1132,6 +1132,12 @@ MSG
|
|
1132
1132
|
assert_equal("2px", evaluate("if(null, 1px, 2px)"))
|
1133
1133
|
end
|
1134
1134
|
|
1135
|
+
def test_counter
|
1136
|
+
assert_equal("counter(foo)", evaluate("counter(foo)"))
|
1137
|
+
assert_equal('counter(item,".")', evaluate('counter(item, ".")'))
|
1138
|
+
assert_equal('counter(item,".")', evaluate('counter(item,".")'))
|
1139
|
+
end
|
1140
|
+
|
1135
1141
|
def test_keyword_args_rgb
|
1136
1142
|
assert_equal(%Q{white}, evaluate("rgb($red: 255, $green: 255, $blue: 255)"))
|
1137
1143
|
end
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sass
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 592302615
|
5
5
|
prerelease: 6
|
6
6
|
segments:
|
7
7
|
- 3
|
8
8
|
- 3
|
9
9
|
- 0
|
10
10
|
- alpha
|
11
|
-
-
|
12
|
-
version: 3.3.0.alpha.
|
11
|
+
- 141
|
12
|
+
version: 3.3.0.alpha.141
|
13
13
|
platform: ruby
|
14
14
|
authors:
|
15
15
|
- Nathan Weizenbaum
|