sass 3.4.10 → 3.4.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/VERSION_DATE +1 -1
- data/lib/sass/exec/sass_scss.rb +11 -0
- data/lib/sass/script/functions.rb +2 -1
- data/lib/sass/script/tree/list_literal.rb +2 -1
- data/lib/sass/selector/simple_sequence.rb +2 -2
- data/lib/sass/tree/rule_node.rb +9 -8
- data/test/sass/conversion_test.rb +0 -2
- data/test/sass/engine_test.rb +21 -7
- data/test/sass/script_conversion_test.rb +22 -2
- data/test/sass/scss/scss_test.rb +25 -0
- 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: 5b356808a261bfc58ed1ea2a65e975f5b64d8048
|
4
|
+
data.tar.gz: c2f0bc6dbd4e8332eed0e0f6e60dad6a79d47797
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c0631122d887b7d410c5fd38dcedd9487ae78e1d22e2f7a5a4be4557d9c1ad40ab55643e590eff2b23a3b3dfecac61057086cfe926015d09e60ee8d1e7abbadb
|
7
|
+
data.tar.gz: 8208ef88dc5a7a6b13493c8a00542587419525fdf980fcd616ff19ec83b39388e1322c5f21f61147eb9f2cd059f5659acf3476ae552abcc5d290cc9563d6caf3
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.4.
|
1
|
+
3.4.11
|
data/VERSION_DATE
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
31 January 2015 02:49:50 UTC
|
data/lib/sass/exec/sass_scss.rb
CHANGED
@@ -42,6 +42,7 @@ END
|
|
42
42
|
if @args.size == 1
|
43
43
|
@args = split_colon_path(@args.first)
|
44
44
|
else
|
45
|
+
@fake_update = true
|
45
46
|
@options[:update] = true
|
46
47
|
end
|
47
48
|
end
|
@@ -312,6 +313,16 @@ MSG
|
|
312
313
|
|
313
314
|
dirs, files = @args.map {|name| split_colon_path(name)}.
|
314
315
|
partition {|i, _| File.directory? i}
|
316
|
+
|
317
|
+
if @fake_update && !dirs.empty?
|
318
|
+
# Issue 1602.
|
319
|
+
Sass::Util.sass_warn <<WARNING.strip
|
320
|
+
DEPRECATION WARNING: Compiling directories without --update or --watch is
|
321
|
+
deprecated and won't work in future versions of Sass. Instead use:
|
322
|
+
#{@default_syntax} --update #{@args}
|
323
|
+
WARNING
|
324
|
+
end
|
325
|
+
|
315
326
|
files.map! do |from, to|
|
316
327
|
to ||= from.gsub(/\.[^.]*?$/, '.css')
|
317
328
|
sourcemap = Sass::Util.sourcemap_name(to) if @options[:sourcemap]
|
@@ -1398,9 +1398,10 @@ module Sass::Script
|
|
1398
1398
|
# @raise [ArgumentError] if `$string` isn't a string
|
1399
1399
|
def unquote(string)
|
1400
1400
|
unless string.is_a?(Sass::Script::Value::String)
|
1401
|
-
Sass::Util.sass_warn(<<MESSAGE)
|
1401
|
+
Sass::Util.sass_warn(<<MESSAGE.strip)
|
1402
1402
|
DEPRECATION WARNING: Passing #{string.to_sass}, a non-string value, to unquote()
|
1403
1403
|
will be an error in future versions of Sass.
|
1404
|
+
#{environment.stack.to_s.gsub(/^/, ' ' * 8)}
|
1404
1405
|
MESSAGE
|
1405
1406
|
return string
|
1406
1407
|
end
|
@@ -32,7 +32,8 @@ module Sass::Script::Tree
|
|
32
32
|
members = elements.map do |v|
|
33
33
|
if v.is_a?(ListLiteral) && Sass::Script::Parser.precedence_of(v.separator) <= precedence ||
|
34
34
|
separator == :space && v.is_a?(UnaryOperation) &&
|
35
|
-
|
35
|
+
(v.operator == :minus || v.operator == :plus) ||
|
36
|
+
separator == :space && v.is_a?(Operation)
|
36
37
|
"(#{v.to_sass(opts)})"
|
37
38
|
else
|
38
39
|
v.to_sass(opts)
|
@@ -133,9 +133,9 @@ module Sass
|
|
133
133
|
end
|
134
134
|
|
135
135
|
Sequence.new(members[0...-1] +
|
136
|
-
[SimpleSequence.new(parent_sub +
|
136
|
+
[SimpleSequence.new(parent_sub + resolved_members[1..-1], subject?)] +
|
137
137
|
[newline].compact)
|
138
|
-
|
138
|
+
end)
|
139
139
|
end
|
140
140
|
|
141
141
|
# Non-destructively extends this selector with the extensions specified in a hash
|
data/lib/sass/tree/rule_node.rb
CHANGED
@@ -132,14 +132,15 @@ module Sass::Tree
|
|
132
132
|
private
|
133
133
|
|
134
134
|
def try_to_parse_non_interpolated_rules
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
135
|
+
@parsed_rules = nil
|
136
|
+
return unless @rule.all? {|t| t.kind_of?(String)}
|
137
|
+
|
138
|
+
# We don't use real filename/line info because we don't have it yet.
|
139
|
+
# When we get it, we'll set it on the parsed rules if possible.
|
140
|
+
parser = Sass::SCSS::StaticParser.new(@rule.join.strip, nil, nil, 1)
|
141
|
+
# rubocop:disable RescueModifier
|
142
|
+
@parsed_rules = parser.parse_selector rescue nil
|
143
|
+
# rubocop:enable RescueModifier
|
143
144
|
end
|
144
145
|
end
|
145
146
|
end
|
@@ -1990,13 +1990,11 @@ foo
|
|
1990
1990
|
ok: -$foo
|
1991
1991
|
comma: 10px, -$foo
|
1992
1992
|
needs-parens: 10px (-$foo)
|
1993
|
-
no-parens: a 50px + 60px b
|
1994
1993
|
SASS
|
1995
1994
|
foo {
|
1996
1995
|
ok: -$foo;
|
1997
1996
|
comma: 10px, -$foo;
|
1998
1997
|
needs-parens: 10px (-$foo);
|
1999
|
-
no-parens: a 50px + 60px b;
|
2000
1998
|
}
|
2001
1999
|
SCSS
|
2002
2000
|
end
|
data/test/sass/engine_test.rb
CHANGED
@@ -2059,20 +2059,21 @@ SASS
|
|
2059
2059
|
end
|
2060
2060
|
|
2061
2061
|
def test_warn_with_imports
|
2062
|
+
prefix = Sass::Util.cleanpath(File.dirname(__FILE__)).to_s
|
2062
2063
|
expected_warning = <<WARN
|
2063
2064
|
WARNING: In the main file
|
2064
|
-
on line 1 of #{
|
2065
|
+
on line 1 of #{prefix}/templates/warn.sass
|
2065
2066
|
|
2066
2067
|
WARNING: Imported
|
2067
|
-
on line 1 of #{
|
2068
|
-
from line 2 of #{
|
2068
|
+
on line 1 of #{prefix}/templates/warn_imported.sass
|
2069
|
+
from line 2 of #{prefix}/templates/warn.sass
|
2069
2070
|
|
2070
2071
|
WARNING: In an imported mixin
|
2071
|
-
on line 4 of #{
|
2072
|
-
from line 3 of #{
|
2072
|
+
on line 4 of #{prefix}/templates/warn_imported.sass, in `emits-a-warning'
|
2073
|
+
from line 3 of #{prefix}/templates/warn.sass
|
2073
2074
|
WARN
|
2074
2075
|
assert_warning expected_warning do
|
2075
|
-
renders_correctly "warn", :style => :compact, :load_paths => [
|
2076
|
+
renders_correctly "warn", :style => :compact, :load_paths => ["#{prefix}/templates"]
|
2076
2077
|
end
|
2077
2078
|
end
|
2078
2079
|
|
@@ -2457,6 +2458,18 @@ SASS
|
|
2457
2458
|
|
2458
2459
|
# Regression tests
|
2459
2460
|
|
2461
|
+
def test_interpolation_in_multiline_selector
|
2462
|
+
assert_equal(<<CSS, render(<<SASS))
|
2463
|
+
.foo,
|
2464
|
+
.bar {
|
2465
|
+
a: b; }
|
2466
|
+
CSS
|
2467
|
+
.foo,
|
2468
|
+
\#{".bar"}
|
2469
|
+
a: b
|
2470
|
+
SASS
|
2471
|
+
end
|
2472
|
+
|
2460
2473
|
def test_list_separator_with_arg_list
|
2461
2474
|
assert_equal(<<CSS, render(<<SASS))
|
2462
2475
|
.test {
|
@@ -3287,7 +3300,8 @@ SASS
|
|
3287
3300
|
end
|
3288
3301
|
|
3289
3302
|
def filename(name, type)
|
3290
|
-
File.dirname(__FILE__) + "/#{type == 'sass' ? 'templates' : 'results'}/#{name}.#{type}"
|
3303
|
+
path = File.dirname(__FILE__) + "/#{type == 'sass' ? 'templates' : 'results'}/#{name}.#{type}"
|
3304
|
+
Sass::Util.cleanpath(path).to_s
|
3291
3305
|
end
|
3292
3306
|
|
3293
3307
|
def sassc_path(template)
|
@@ -76,6 +76,26 @@ class SassScriptConversionTest < MiniTest::Test
|
|
76
76
|
assert_renders "null"
|
77
77
|
end
|
78
78
|
|
79
|
+
def test_space_list
|
80
|
+
assert_renders "foo bar baz"
|
81
|
+
assert_renders "foo (bar baz) bip"
|
82
|
+
assert_renders "foo (bar, baz) bip"
|
83
|
+
end
|
84
|
+
|
85
|
+
def test_comma_list
|
86
|
+
assert_renders "foo, bar, baz"
|
87
|
+
assert_renders "foo, (bar, baz), bip"
|
88
|
+
assert_renders "foo, bar baz, bip"
|
89
|
+
end
|
90
|
+
|
91
|
+
def test_space_list_adds_parens_for_clarity
|
92
|
+
assert_renders "(1 + 1) (2 / 4) (3 * 5)"
|
93
|
+
end
|
94
|
+
|
95
|
+
def test_comma_list_doesnt_add_parens
|
96
|
+
assert_renders "1 + 1, 2 / 4, 3 * 5"
|
97
|
+
end
|
98
|
+
|
79
99
|
def test_empty_list
|
80
100
|
assert_renders "()"
|
81
101
|
end
|
@@ -221,8 +241,8 @@ RUBY
|
|
221
241
|
assert_renders "$foo or ($bar $baz)"
|
222
242
|
assert_renders "($foo $bar) or $baz"
|
223
243
|
|
224
|
-
|
225
|
-
|
244
|
+
assert_renders "$foo ($bar or $baz)"
|
245
|
+
assert_renders "($foo or $bar) $baz"
|
226
246
|
|
227
247
|
assert_equal "$foo ($bar $baz)", render("$foo ($bar $baz)")
|
228
248
|
assert_equal "($foo $bar) $baz", render("($foo $bar) $baz")
|
data/test/sass/scss/scss_test.rb
CHANGED
@@ -3693,6 +3693,31 @@ CSS
|
|
3693
3693
|
SCSS
|
3694
3694
|
end
|
3695
3695
|
|
3696
|
+
def test_parent_selector_in_and_out_of_function_pseudo_selector
|
3697
|
+
# Regression test for https://github.com/sass/sass/issues/1464#issuecomment-70352288
|
3698
|
+
assert_equal(<<CSS, render(<<SCSS))
|
3699
|
+
.a:not(.a-b) {
|
3700
|
+
x: y; }
|
3701
|
+
CSS
|
3702
|
+
.a {
|
3703
|
+
&:not(&-b) {
|
3704
|
+
x: y;
|
3705
|
+
}
|
3706
|
+
}
|
3707
|
+
SCSS
|
3708
|
+
|
3709
|
+
assert_equal(<<CSS, render(<<SCSS))
|
3710
|
+
.a:nth-child(2n of .a-b) {
|
3711
|
+
x: y; }
|
3712
|
+
CSS
|
3713
|
+
.a {
|
3714
|
+
&:nth-child(2n of &-b) {
|
3715
|
+
x: y;
|
3716
|
+
}
|
3717
|
+
}
|
3718
|
+
SCSS
|
3719
|
+
end
|
3720
|
+
|
3696
3721
|
def test_attribute_selector_in_selector_pseudoclass
|
3697
3722
|
# Even though this is plain CSS, it only failed when given to the SCSS
|
3698
3723
|
# parser.
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sass
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.4.
|
4
|
+
version: 3.4.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Natalie Weizenbaum
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2015-01-
|
13
|
+
date: 2015-01-31 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: yard
|