sass 3.4.22 → 3.4.24
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +1 -1
- data/CONTRIBUTING.md +23 -0
- data/README.md +8 -8
- data/Rakefile +2 -10
- data/VERSION +1 -1
- data/VERSION_DATE +1 -1
- data/extra/sass-spec-ref.sh +32 -0
- data/lib/sass/cache_stores/filesystem.rb +1 -1
- data/lib/sass/engine.rb +3 -3
- data/lib/sass/error.rb +3 -3
- data/lib/sass/exec/base.rb +1 -1
- data/lib/sass/logger/base.rb +8 -2
- data/lib/sass/logger/delayed.rb +50 -0
- data/lib/sass/logger.rb +8 -3
- data/lib/sass/plugin/rack.rb +1 -1
- data/lib/sass/plugin/staleness_checker.rb +2 -2
- data/lib/sass/script/functions.rb +10 -7
- data/lib/sass/script/lexer.rb +5 -5
- data/lib/sass/script/parser.rb +17 -11
- data/lib/sass/script/tree/node.rb +1 -1
- data/lib/sass/script/value/base.rb +2 -2
- data/lib/sass/script/value/color.rb +10 -10
- data/lib/sass/script/value/number.rb +11 -9
- data/lib/sass/script.rb +2 -2
- data/lib/sass/scss/parser.rb +26 -8
- data/lib/sass/scss/rx.rb +1 -1
- data/lib/sass/selector/abstract_sequence.rb +5 -5
- data/lib/sass/selector/sequence.rb +2 -2
- data/lib/sass/selector/simple.rb +4 -4
- data/lib/sass/shared.rb +1 -1
- data/lib/sass/source/map.rb +5 -3
- data/lib/sass/source/position.rb +4 -4
- data/lib/sass/tree/comment_node.rb +1 -1
- data/lib/sass/tree/node.rb +1 -1
- data/lib/sass/tree/prop_node.rb +1 -1
- data/lib/sass/tree/rule_node.rb +1 -1
- data/lib/sass/tree/visitors/convert.rb +3 -1
- data/lib/sass/tree/visitors/to_css.rb +1 -1
- data/lib/sass/util.rb +33 -8
- data/lib/sass/version.rb +2 -2
- data/test/sass/conversion_test.rb +17 -0
- data/test/sass/extend_test.rb +38 -18
- data/test/sass/script_test.rb +3 -3
- data/test/sass/scss/scss_test.rb +33 -0
- metadata +28 -26
data/test/sass/extend_test.rb
CHANGED
@@ -167,42 +167,52 @@ SCSS
|
|
167
167
|
end
|
168
168
|
|
169
169
|
def test_universal_unification_with_namespaceless_universal_target
|
170
|
+
assert_extend_doesnt_match('ns|*', '.foo', :failed_to_unify, 2) do
|
171
|
+
render_unification '*.foo', 'ns|* {@extend .foo}'
|
172
|
+
end
|
173
|
+
|
170
174
|
assert_unification '*.foo', '* {@extend .foo}', '*'
|
171
175
|
assert_unification '*.foo', '*|* {@extend .foo}', '*'
|
172
176
|
assert_unification '*|*.foo', '* {@extend .foo}', '*|*.foo, *'
|
173
177
|
assert_unification '*|*.foo', '*|* {@extend .foo}', '*|*'
|
174
|
-
assert_unification '*.foo', 'ns|* {@extend .foo}', '*.foo, ns|*'
|
175
178
|
assert_unification '*|*.foo', 'ns|* {@extend .foo}', '*|*.foo, ns|*'
|
176
179
|
end
|
177
180
|
|
178
181
|
def test_universal_unification_with_namespaced_universal_target
|
179
|
-
|
180
|
-
|
182
|
+
assert_extend_doesnt_match('*', '.foo', :failed_to_unify, 2) do
|
183
|
+
render_unification 'ns|*.foo', '* {@extend .foo}'
|
184
|
+
end
|
181
185
|
|
182
186
|
assert_extend_doesnt_match('ns2|*', '.foo', :failed_to_unify, 2) do
|
183
187
|
render_unification 'ns1|*.foo', 'ns2|* {@extend .foo}'
|
184
188
|
end
|
185
189
|
|
190
|
+
assert_unification 'ns|*.foo', '*|* {@extend .foo}', 'ns|*'
|
186
191
|
assert_unification 'ns|*.foo', 'ns|* {@extend .foo}', 'ns|*'
|
187
192
|
end
|
188
193
|
|
189
194
|
def test_universal_unification_with_namespaceless_element_target
|
195
|
+
assert_extend_doesnt_match('ns|*', '.foo', :failed_to_unify, 2) do
|
196
|
+
render_unification 'a.foo', 'ns|* {@extend .foo}'
|
197
|
+
end
|
198
|
+
|
190
199
|
assert_unification 'a.foo', '* {@extend .foo}', 'a'
|
191
200
|
assert_unification 'a.foo', '*|* {@extend .foo}', 'a'
|
192
201
|
assert_unification '*|a.foo', '* {@extend .foo}', '*|a.foo, a'
|
193
202
|
assert_unification '*|a.foo', '*|* {@extend .foo}', '*|a'
|
194
|
-
assert_unification 'a.foo', 'ns|* {@extend .foo}', 'a.foo, ns|a'
|
195
203
|
assert_unification '*|a.foo', 'ns|* {@extend .foo}', '*|a.foo, ns|a'
|
196
204
|
end
|
197
205
|
|
198
206
|
def test_universal_unification_with_namespaced_element_target
|
199
|
-
|
200
|
-
|
207
|
+
assert_extend_doesnt_match('*', '.foo', :failed_to_unify, 2) do
|
208
|
+
render_unification 'ns|a.foo', '* {@extend .foo}'
|
209
|
+
end
|
201
210
|
|
202
211
|
assert_extend_doesnt_match('ns2|*', '.foo', :failed_to_unify, 2) do
|
203
212
|
render_unification 'ns1|a.foo', 'ns2|* {@extend .foo}'
|
204
213
|
end
|
205
214
|
|
215
|
+
assert_unification 'ns|a.foo', '*|* {@extend .foo}', 'ns|a'
|
206
216
|
assert_unification 'ns|a.foo', 'ns|* {@extend .foo}', 'ns|a'
|
207
217
|
end
|
208
218
|
|
@@ -214,46 +224,56 @@ SCSS
|
|
214
224
|
end
|
215
225
|
|
216
226
|
def test_element_unification_with_namespaceless_universal_target
|
227
|
+
assert_extend_doesnt_match('ns|a', '.foo', :failed_to_unify, 2) do
|
228
|
+
render_unification '*.foo', 'ns|a {@extend .foo}'
|
229
|
+
end
|
230
|
+
|
217
231
|
assert_unification '*.foo', 'a {@extend .foo}', '*.foo, a'
|
218
232
|
assert_unification '*.foo', '*|a {@extend .foo}', '*.foo, a'
|
219
233
|
assert_unification '*|*.foo', 'a {@extend .foo}', '*|*.foo, a'
|
220
234
|
assert_unification '*|*.foo', '*|a {@extend .foo}', '*|*.foo, *|a'
|
221
|
-
assert_unification '*.foo', 'ns|a {@extend .foo}', '*.foo, ns|a'
|
222
235
|
assert_unification '*|*.foo', 'ns|a {@extend .foo}', '*|*.foo, ns|a'
|
223
236
|
end
|
224
237
|
|
225
238
|
def test_element_unification_with_namespaced_universal_target
|
226
|
-
|
227
|
-
|
239
|
+
assert_extend_doesnt_match('a', '.foo', :failed_to_unify, 2) do
|
240
|
+
render_unification 'ns|*.foo', 'a {@extend .foo}'
|
241
|
+
end
|
228
242
|
|
229
243
|
assert_extend_doesnt_match('ns2|a', '.foo', :failed_to_unify, 2) do
|
230
244
|
render_unification 'ns1|*.foo', 'ns2|a {@extend .foo}'
|
231
245
|
end
|
232
246
|
|
247
|
+
assert_unification 'ns|*.foo', '*|a {@extend .foo}', 'ns|*.foo, ns|a'
|
233
248
|
assert_unification 'ns|*.foo', 'ns|a {@extend .foo}', 'ns|*.foo, ns|a'
|
234
249
|
end
|
235
250
|
|
236
251
|
def test_element_unification_with_namespaceless_element_target
|
252
|
+
assert_extend_doesnt_match('ns|a', '.foo', :failed_to_unify, 2) do
|
253
|
+
render_unification 'a.foo', 'ns|a {@extend .foo}'
|
254
|
+
end
|
255
|
+
|
256
|
+
assert_extend_doesnt_match('h1', '.foo', :failed_to_unify, 2) do
|
257
|
+
render_unification 'a.foo', 'h1 {@extend .foo}'
|
258
|
+
end
|
259
|
+
|
237
260
|
assert_unification 'a.foo', 'a {@extend .foo}', 'a'
|
238
261
|
assert_unification 'a.foo', '*|a {@extend .foo}', 'a'
|
239
262
|
assert_unification '*|a.foo', 'a {@extend .foo}', '*|a.foo, a'
|
240
263
|
assert_unification '*|a.foo', '*|a {@extend .foo}', '*|a'
|
241
|
-
assert_unification 'a.foo', 'ns|a {@extend .foo}', 'a.foo, ns|a'
|
242
264
|
assert_unification '*|a.foo', 'ns|a {@extend .foo}', '*|a.foo, ns|a'
|
243
|
-
|
244
|
-
assert_extend_doesnt_match('h1', '.foo', :failed_to_unify, 2) do
|
245
|
-
render_unification 'a.foo', 'h1 {@extend .foo}'
|
246
|
-
end
|
247
265
|
end
|
248
266
|
|
249
267
|
def test_element_unification_with_namespaced_element_target
|
250
|
-
|
251
|
-
|
268
|
+
assert_extend_doesnt_match('a', '.foo', :failed_to_unify, 2) do
|
269
|
+
render_unification 'ns|a.foo', 'a {@extend .foo}'
|
270
|
+
end
|
252
271
|
|
253
272
|
assert_extend_doesnt_match('ns2|a', '.foo', :failed_to_unify, 2) do
|
254
273
|
render_unification 'ns1|a.foo', 'ns2|a {@extend .foo}'
|
255
274
|
end
|
256
275
|
|
276
|
+
assert_unification 'ns|a.foo', '*|a {@extend .foo}', 'ns|a'
|
257
277
|
assert_unification 'ns|a.foo', 'ns|a {@extend .foo}', 'ns|a'
|
258
278
|
end
|
259
279
|
|
@@ -567,7 +587,7 @@ SCSS
|
|
567
587
|
end
|
568
588
|
|
569
589
|
def test_long_extendee_runs_unification
|
570
|
-
assert_extends 'ns|*.foo.bar', 'a.baz {@extend .foo.bar}', 'ns|*.foo.bar, ns|a.baz'
|
590
|
+
assert_extends 'ns|*.foo.bar', '*|a.baz {@extend .foo.bar}', 'ns|*.foo.bar, ns|a.baz'
|
571
591
|
end
|
572
592
|
|
573
593
|
## Long Extenders
|
@@ -577,7 +597,7 @@ SCSS
|
|
577
597
|
end
|
578
598
|
|
579
599
|
def test_long_extender_runs_unification
|
580
|
-
assert_extends 'ns|*.foo.bar', 'a.baz {@extend .foo}', 'ns|*.foo.bar, ns|a.bar.baz'
|
600
|
+
assert_extends 'ns|*.foo.bar', '*|a.baz {@extend .foo}', 'ns|*.foo.bar, ns|a.bar.baz'
|
581
601
|
end
|
582
602
|
|
583
603
|
def test_long_extender_aborts_unification
|
data/test/sass/script_test.rb
CHANGED
@@ -558,9 +558,9 @@ WARNING
|
|
558
558
|
end
|
559
559
|
|
560
560
|
def test_resolution_units
|
561
|
-
assert_equal "
|
562
|
-
assert_equal "
|
563
|
-
assert_equal "
|
561
|
+
assert_equal "0.3937", resolve("(1dpi/1dpcm)")
|
562
|
+
assert_equal "0.02646", resolve("(1dpcm/1dppx)")
|
563
|
+
assert_equal "96", resolve("(1dppx/1dpi)")
|
564
564
|
end
|
565
565
|
|
566
566
|
def test_operations_have_options
|
data/test/sass/scss/scss_test.rb
CHANGED
@@ -3649,6 +3649,39 @@ SCSS
|
|
3649
3649
|
|
3650
3650
|
# Regression
|
3651
3651
|
|
3652
|
+
# Regression test for #2031.
|
3653
|
+
def test_no_interpolation_warning_in_nested_selector
|
3654
|
+
assert_no_warning {assert_equal(<<CSS, render(<<SCSS))}
|
3655
|
+
z a:b(n+1) {
|
3656
|
+
x: y; }
|
3657
|
+
CSS
|
3658
|
+
z {
|
3659
|
+
a:b(n+\#{1}) {
|
3660
|
+
x: y;
|
3661
|
+
}
|
3662
|
+
}
|
3663
|
+
SCSS
|
3664
|
+
end
|
3665
|
+
|
3666
|
+
# Ensures that the fix for #2031 doesn't hide legitimate warnings.
|
3667
|
+
def test_interpolation_warning_in_selector_like_property
|
3668
|
+
assert_warning(<<WARNING) {assert_equal(<<CSS, render(<<SCSS))}
|
3669
|
+
DEPRECATION WARNING on line 2 of #{filename_for_test :scss}: \#{} interpolation near operators will be simplified
|
3670
|
+
in a future version of Sass. To preserve the current behavior, use quotes:
|
3671
|
+
|
3672
|
+
unquote("n+1")
|
3673
|
+
|
3674
|
+
You can use the sass-convert command to automatically fix most cases.
|
3675
|
+
WARNING
|
3676
|
+
z {
|
3677
|
+
a: b(n+1); }
|
3678
|
+
CSS
|
3679
|
+
z {
|
3680
|
+
a:b(n+\#{1});
|
3681
|
+
}
|
3682
|
+
SCSS
|
3683
|
+
end
|
3684
|
+
|
3652
3685
|
def test_escape_in_selector
|
3653
3686
|
assert_equal(<<CSS, render(".\\!foo {a: b}"))
|
3654
3687
|
.\\!foo {
|
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.24
|
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:
|
13
|
+
date: 2017-05-19 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: yard
|
@@ -18,28 +18,28 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - ">="
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 0.
|
21
|
+
version: 0.9.8
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
requirements:
|
26
26
|
- - ">="
|
27
27
|
- !ruby/object:Gem::Version
|
28
|
-
version: 0.
|
28
|
+
version: 0.9.8
|
29
29
|
- !ruby/object:Gem::Dependency
|
30
|
-
name:
|
30
|
+
name: redcarpet
|
31
31
|
requirement: !ruby/object:Gem::Requirement
|
32
32
|
requirements:
|
33
|
-
- - "
|
33
|
+
- - "~>"
|
34
34
|
- !ruby/object:Gem::Version
|
35
|
-
version:
|
35
|
+
version: 2.3.0
|
36
36
|
type: :development
|
37
37
|
prerelease: false
|
38
38
|
version_requirements: !ruby/object:Gem::Requirement
|
39
39
|
requirements:
|
40
|
-
- - "
|
40
|
+
- - "~>"
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version:
|
42
|
+
version: 2.3.0
|
43
43
|
- !ruby/object:Gem::Dependency
|
44
44
|
name: minitest
|
45
45
|
requirement: !ruby/object:Gem::Requirement
|
@@ -80,6 +80,7 @@ files:
|
|
80
80
|
- bin/sass
|
81
81
|
- bin/sass-convert
|
82
82
|
- bin/scss
|
83
|
+
- extra/sass-spec-ref.sh
|
83
84
|
- extra/update_watch.rb
|
84
85
|
- init.rb
|
85
86
|
- lib/sass.rb
|
@@ -105,6 +106,7 @@ files:
|
|
105
106
|
- lib/sass/importers/filesystem.rb
|
106
107
|
- lib/sass/logger.rb
|
107
108
|
- lib/sass/logger/base.rb
|
109
|
+
- lib/sass/logger/delayed.rb
|
108
110
|
- lib/sass/logger/log_level.rb
|
109
111
|
- lib/sass/media.rb
|
110
112
|
- lib/sass/plugin.rb
|
@@ -394,34 +396,34 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
394
396
|
version: '0'
|
395
397
|
requirements: []
|
396
398
|
rubyforge_project: sass
|
397
|
-
rubygems_version: 2.
|
399
|
+
rubygems_version: 2.6.11
|
398
400
|
signing_key:
|
399
401
|
specification_version: 4
|
400
402
|
summary: A powerful but elegant CSS compiler that makes CSS fun again.
|
401
403
|
test_files:
|
402
|
-
- test/sass/
|
403
|
-
- test/sass/callbacks_test.rb
|
404
|
-
- test/sass/compiler_test.rb
|
405
|
-
- test/sass/conversion_test.rb
|
406
|
-
- test/sass/css2sass_test.rb
|
407
|
-
- test/sass/css_variable_test.rb
|
404
|
+
- test/sass/plugin_test.rb
|
408
405
|
- test/sass/encoding_test.rb
|
409
|
-
- test/sass/engine_test.rb
|
410
|
-
- test/sass/exec_test.rb
|
411
|
-
- test/sass/extend_test.rb
|
412
|
-
- test/sass/functions_test.rb
|
413
406
|
- test/sass/importer_test.rb
|
414
|
-
- test/sass/
|
415
|
-
- test/sass/plugin_test.rb
|
416
|
-
- test/sass/script_conversion_test.rb
|
417
|
-
- test/sass/script_test.rb
|
407
|
+
- test/sass/callbacks_test.rb
|
418
408
|
- test/sass/scss/css_test.rb
|
419
409
|
- test/sass/scss/rx_test.rb
|
420
410
|
- test/sass/scss/scss_test.rb
|
421
|
-
- test/sass/source_map_test.rb
|
422
|
-
- test/sass/superselector_test.rb
|
423
411
|
- test/sass/util/multibyte_string_scanner_test.rb
|
424
412
|
- test/sass/util/normalized_map_test.rb
|
425
413
|
- test/sass/util/subset_map_test.rb
|
414
|
+
- test/sass/functions_test.rb
|
426
415
|
- test/sass/util_test.rb
|
416
|
+
- test/sass/cache_test.rb
|
417
|
+
- test/sass/exec_test.rb
|
427
418
|
- test/sass/value_helpers_test.rb
|
419
|
+
- test/sass/conversion_test.rb
|
420
|
+
- test/sass/script_test.rb
|
421
|
+
- test/sass/logger_test.rb
|
422
|
+
- test/sass/compiler_test.rb
|
423
|
+
- test/sass/engine_test.rb
|
424
|
+
- test/sass/css2sass_test.rb
|
425
|
+
- test/sass/superselector_test.rb
|
426
|
+
- test/sass/script_conversion_test.rb
|
427
|
+
- test/sass/css_variable_test.rb
|
428
|
+
- test/sass/source_map_test.rb
|
429
|
+
- test/sass/extend_test.rb
|