sass 3.4.7 → 3.4.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +13 -5
- data/VERSION +1 -1
- data/VERSION_DATE +1 -1
- data/lib/sass/script/functions.rb +22 -5
- data/lib/sass/selector/simple_sequence.rb +14 -0
- data/test/foo.scss +1 -0
- data/test/sass/extend_test.rb +15 -1
- data/test/sass/functions_test.rb +28 -0
- metadata +34 -34
checksums.yaml
CHANGED
@@ -1,7 +1,15 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
OTMwOWU4MTI1ZGY3NGJkZmRhNGQ1Yjc3YWM0NGZhZTBhNDhkYTI1MQ==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
MDVmYTBlMDc2MTE4M2U2NmEwNDFjYjlmMTQzMTUzYzk5MjA3NGEwZg==
|
5
7
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
MzlmZDNjMjg0NTJlMjZmOTk4YTU3Y2YwNjlhMTk0Njc0OGEwM2RhYjdjYTZh
|
10
|
+
MzdhMjg5OTg1ZjVmZmY2OGY2OWVlN2E5MjcwZmU3OGQxMmU0ZWIwZjE0NDhk
|
11
|
+
MGQ1OWUwNGQ2NDU1OTIzMDA0YjAzZjhiMGNmM2JjZTZlMzUyYzU=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
ZjNmNDJmYTBkOWUxMmU3ZDQzMDc0NzRhMWU1ZWZiMWY1MjM1YmEwZDkwMGZi
|
14
|
+
Nzg5MDFiZWY3NTFmMmU4M2ViY2M2NjUwZGQxNGZkZGI3ODlhNjRlYWE5NTRh
|
15
|
+
MjAwMzYzODkzZDA0NmIyM2EzMjVmNzA5M2Y5YzFkZTg1YTY4ZmM=
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.4.
|
1
|
+
3.4.8
|
data/VERSION_DATE
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
15 November 2014 00:58:58 UTC
|
@@ -482,8 +482,7 @@ module Sass::Script
|
|
482
482
|
include Value::Helpers
|
483
483
|
|
484
484
|
# The human-readable names for [Sass::Script::Value::Base]. The default is
|
485
|
-
# just the downcased name of the type.
|
486
|
-
# name.
|
485
|
+
# just the downcased name of the type.
|
487
486
|
TYPE_NAMES = {:ArgList => 'variable argument list'}
|
488
487
|
|
489
488
|
# The environment for this function. This environment's
|
@@ -652,11 +651,11 @@ module Sass::Script
|
|
652
651
|
#
|
653
652
|
# @overload rgba($red, $green, $blue, $alpha)
|
654
653
|
# @param $red [Sass::Script::Value::Number] The amount of red in the
|
655
|
-
# color. Must be between 0 and 255 inclusive
|
654
|
+
# color. Must be between 0 and 255 inclusive or 0% and 100% inclusive
|
656
655
|
# @param $green [Sass::Script::Value::Number] The amount of green in the
|
657
|
-
# color. Must be between 0 and 255 inclusive
|
656
|
+
# color. Must be between 0 and 255 inclusive or 0% and 100% inclusive
|
658
657
|
# @param $blue [Sass::Script::Value::Number] The amount of blue in the
|
659
|
-
# color. Must be between 0 and 255 inclusive
|
658
|
+
# color. Must be between 0 and 255 inclusive or 0% and 100% inclusive
|
660
659
|
# @param $alpha [Sass::Script::Value::Number] The opacity of the color.
|
661
660
|
# Must be between 0 and 1 inclusive
|
662
661
|
# @return [Sass::Script::Value::Color]
|
@@ -684,6 +683,7 @@ module Sass::Script
|
|
684
683
|
|
685
684
|
assert_type color, :Color, :color
|
686
685
|
assert_type alpha, :Number, :alpha
|
686
|
+
check_alpha_unit alpha, 'rgba'
|
687
687
|
|
688
688
|
color.with(:alpha => alpha.value)
|
689
689
|
when 4
|
@@ -741,6 +741,7 @@ module Sass::Script
|
|
741
741
|
assert_type saturation, :Number, :saturation
|
742
742
|
assert_type lightness, :Number, :lightness
|
743
743
|
assert_type alpha, :Number, :alpha
|
744
|
+
check_alpha_unit alpha, 'hsla'
|
744
745
|
|
745
746
|
h = hue.value
|
746
747
|
s = saturation.value
|
@@ -2625,5 +2626,21 @@ module Sass::Script
|
|
2625
2626
|
|
2626
2627
|
color.with(attr => color.send(attr).send(op, amount.value))
|
2627
2628
|
end
|
2629
|
+
|
2630
|
+
def check_alpha_unit(alpha, function)
|
2631
|
+
return if alpha.unitless?
|
2632
|
+
|
2633
|
+
if alpha.is_unit?("%")
|
2634
|
+
Sass::Util.sass_warn(<<WARNING)
|
2635
|
+
DEPRECATION WARNING: Passing a percentage as the alpha value to #{function}() will be
|
2636
|
+
interpreted differently in future versions of Sass. For now, use #{alpha.value} instead.
|
2637
|
+
WARNING
|
2638
|
+
else
|
2639
|
+
Sass::Util.sass_warn(<<WARNING)
|
2640
|
+
DEPRECATION WARNING: Passing a number with units as the alpha value to #{function}() is
|
2641
|
+
deprecated and will be an error in future versions of Sass. Use #{alpha.value} instead.
|
2642
|
+
WARNING
|
2643
|
+
end
|
2644
|
+
end
|
2628
2645
|
end
|
2629
2646
|
end
|
@@ -164,6 +164,20 @@ module Sass
|
|
164
164
|
extended = sel.selector.do_extend(extends, parent_directives, replace, seen, !:original)
|
165
165
|
next sel if extended == sel.selector
|
166
166
|
extended.members.reject! {|seq| seq.has_placeholder?}
|
167
|
+
|
168
|
+
# For `:not()`, we usually want to get rid of any complex
|
169
|
+
# selectors becuase that will cause the selector to fail to
|
170
|
+
# parse on all browsers at time of writing. We can keep them
|
171
|
+
# if either the original selector had a complex selector, or
|
172
|
+
# the result of extending has only complex selectors,
|
173
|
+
# because either way we aren't breaking anything that isn't
|
174
|
+
# already broken.
|
175
|
+
if sel.normalized_name == 'not' &&
|
176
|
+
(sel.selector.members.none? {|seq| seq.members.length > 1} &&
|
177
|
+
extended.members.any? {|seq| seq.members.length == 1})
|
178
|
+
extended.members.reject! {|seq| seq.members.length > 1}
|
179
|
+
end
|
180
|
+
|
167
181
|
modified_original = true
|
168
182
|
result = sel.with_selector(extended)
|
169
183
|
result.each {|new_sel| seen_with_pseudo_selectors << [new_sel]}
|
data/test/foo.scss
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
foo {a: x}
|
data/test/sass/extend_test.rb
CHANGED
@@ -362,7 +362,21 @@ SCSS
|
|
362
362
|
end
|
363
363
|
|
364
364
|
def test_complex_extend_into_pseudoclass
|
365
|
-
|
365
|
+
# Unlike other selectors, we don't allow complex selectors to be
|
366
|
+
# added to `:not` if they weren't there before. At time of
|
367
|
+
# writing, most browsers don't support that and will throw away
|
368
|
+
# the entire selector if it exists.
|
369
|
+
#assert_extends(':not(.bar)', '.x .y {@extend .bar}', ':not(.bar)')
|
370
|
+
|
371
|
+
# If the `:not()` already has a complex selector, we won't break
|
372
|
+
# anything by adding a new one.
|
373
|
+
assert_extends(':not(.baz .bar)', '.x .y {@extend .bar}',
|
374
|
+
':not(.baz .bar):not(.baz .x .y):not(.x .baz .y)')
|
375
|
+
|
376
|
+
# If the `:not()` would only contain complex selectors, there's no
|
377
|
+
# harm in letting it continue to exist.
|
378
|
+
assert_extends(':not(%bar)', '.x .y {@extend %bar}', ':not(.x .y)')
|
379
|
+
|
366
380
|
assert_extends(':matches(.bar)', '.x .y {@extend .bar}', ':matches(.bar, .x .y)')
|
367
381
|
assert_extends(':current(.bar)', '.x .y {@extend .bar}', ':current(.bar, .x .y)')
|
368
382
|
assert_extends(':has(.bar)', '.x .y {@extend .bar}', ':has(.bar, .x .y)')
|
data/test/sass/functions_test.rb
CHANGED
@@ -122,6 +122,20 @@ class SassFunctionTest < MiniTest::Test
|
|
122
122
|
assert_error_message("$alpha: \"foo\" is not a number for `hsla'", "hsla(10, 10, 10, \"foo\")");
|
123
123
|
end
|
124
124
|
|
125
|
+
def test_hsla_percent_warning
|
126
|
+
assert_warning(<<WARNING) {evaluate("hsla(180, 60%, 50%, 40%)")}
|
127
|
+
DEPRECATION WARNING: Passing a percentage as the alpha value to hsla() will be
|
128
|
+
interpreted differently in future versions of Sass. For now, use 40 instead.
|
129
|
+
WARNING
|
130
|
+
end
|
131
|
+
|
132
|
+
def test_hsla_unit_warning
|
133
|
+
assert_warning(<<WARNING) {evaluate("hsla(180, 60%, 50%, 40em)")}
|
134
|
+
DEPRECATION WARNING: Passing a number with units as the alpha value to hsla() is
|
135
|
+
deprecated and will be an error in future versions of Sass. Use 40 instead.
|
136
|
+
WARNING
|
137
|
+
end
|
138
|
+
|
125
139
|
def test_percentage
|
126
140
|
assert_equal("50%", evaluate("percentage(.5)"))
|
127
141
|
assert_equal("100%", evaluate("percentage(1)"))
|
@@ -274,6 +288,20 @@ class SassFunctionTest < MiniTest::Test
|
|
274
288
|
assert_error_message("wrong number of arguments (5 for 4) for `rgba'", "rgba(1, 2, 3, 0.4, 5)");
|
275
289
|
end
|
276
290
|
|
291
|
+
def test_rgba_percent_warning
|
292
|
+
assert_warning(<<WARNING) {evaluate("rgba(1, 2, 3, 40%)")}
|
293
|
+
DEPRECATION WARNING: Passing a percentage as the alpha value to rgba() will be
|
294
|
+
interpreted differently in future versions of Sass. For now, use 40 instead.
|
295
|
+
WARNING
|
296
|
+
end
|
297
|
+
|
298
|
+
def test_rgba_unit_warning
|
299
|
+
assert_warning(<<WARNING) {evaluate("rgba(1, 2, 3, 40em)")}
|
300
|
+
DEPRECATION WARNING: Passing a number with units as the alpha value to rgba() is
|
301
|
+
deprecated and will be an error in future versions of Sass. Use 40 instead.
|
302
|
+
WARNING
|
303
|
+
end
|
304
|
+
|
277
305
|
def test_red
|
278
306
|
assert_equal("18", evaluate("red(#123456)"))
|
279
307
|
assert_equal("18", evaluate("red($color: #123456)"))
|
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.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Natalie Weizenbaum
|
@@ -10,55 +10,54 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2014-
|
13
|
+
date: 2014-11-15 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: yard
|
17
17
|
requirement: !ruby/object:Gem::Requirement
|
18
18
|
requirements:
|
19
|
-
- - '>='
|
19
|
+
- - ! '>='
|
20
20
|
- !ruby/object:Gem::Version
|
21
21
|
version: 0.5.3
|
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
28
|
version: 0.5.3
|
29
29
|
- !ruby/object:Gem::Dependency
|
30
30
|
name: maruku
|
31
31
|
requirement: !ruby/object:Gem::Requirement
|
32
32
|
requirements:
|
33
|
-
- - '>='
|
33
|
+
- - ! '>='
|
34
34
|
- !ruby/object:Gem::Version
|
35
35
|
version: 0.5.9
|
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
42
|
version: 0.5.9
|
43
43
|
- !ruby/object:Gem::Dependency
|
44
44
|
name: minitest
|
45
45
|
requirement: !ruby/object:Gem::Requirement
|
46
46
|
requirements:
|
47
|
-
- - '>='
|
47
|
+
- - ! '>='
|
48
48
|
- !ruby/object:Gem::Version
|
49
49
|
version: '5'
|
50
50
|
type: :development
|
51
51
|
prerelease: false
|
52
52
|
version_requirements: !ruby/object:Gem::Requirement
|
53
53
|
requirements:
|
54
|
-
- - '>='
|
54
|
+
- - ! '>='
|
55
55
|
- !ruby/object:Gem::Version
|
56
56
|
version: '5'
|
57
|
-
description:
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
command line tool or a web-framework plugin.
|
57
|
+
description: ! " Sass makes CSS fun again. Sass is an extension of CSS3, adding\n
|
58
|
+
\ nested rules, variables, mixins, selector inheritance, and more.\n It's
|
59
|
+
translated to well-formatted, standard CSS using the\n command line tool or
|
60
|
+
a web-framework plugin.\n"
|
62
61
|
email: sass-lang@googlegroups.com
|
63
62
|
executables:
|
64
63
|
- sass
|
@@ -211,6 +210,7 @@ files:
|
|
211
210
|
- lib/sass/util/test.rb
|
212
211
|
- lib/sass/version.rb
|
213
212
|
- rails/init.rb
|
213
|
+
- test/foo.scss
|
214
214
|
- test/sass/cache_test.rb
|
215
215
|
- test/sass/callbacks_test.rb
|
216
216
|
- test/sass/compiler_test.rb
|
@@ -381,43 +381,43 @@ require_paths:
|
|
381
381
|
- lib
|
382
382
|
required_ruby_version: !ruby/object:Gem::Requirement
|
383
383
|
requirements:
|
384
|
-
- - '>='
|
384
|
+
- - ! '>='
|
385
385
|
- !ruby/object:Gem::Version
|
386
386
|
version: 1.8.7
|
387
387
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
388
388
|
requirements:
|
389
|
-
- - '>='
|
389
|
+
- - ! '>='
|
390
390
|
- !ruby/object:Gem::Version
|
391
391
|
version: '0'
|
392
392
|
requirements: []
|
393
393
|
rubyforge_project: sass
|
394
|
-
rubygems_version: 2.
|
394
|
+
rubygems_version: 2.4.3
|
395
395
|
signing_key:
|
396
396
|
specification_version: 4
|
397
397
|
summary: A powerful but elegant CSS compiler that makes CSS fun again.
|
398
398
|
test_files:
|
399
|
+
- test/sass/engine_test.rb
|
400
|
+
- test/sass/functions_test.rb
|
399
401
|
- test/sass/value_helpers_test.rb
|
402
|
+
- test/sass/extend_test.rb
|
403
|
+
- test/sass/logger_test.rb
|
404
|
+
- test/sass/compiler_test.rb
|
405
|
+
- test/sass/css2sass_test.rb
|
400
406
|
- test/sass/conversion_test.rb
|
401
|
-
- test/sass/cache_test.rb
|
402
407
|
- test/sass/script_test.rb
|
403
|
-
- test/sass/
|
408
|
+
- test/sass/exec_test.rb
|
409
|
+
- test/sass/util/subset_map_test.rb
|
410
|
+
- test/sass/util/multibyte_string_scanner_test.rb
|
411
|
+
- test/sass/util/normalized_map_test.rb
|
404
412
|
- test/sass/callbacks_test.rb
|
405
|
-
- test/sass/
|
406
|
-
- test/sass/script_conversion_test.rb
|
407
|
-
- test/sass/util_test.rb
|
408
|
-
- test/sass/plugin_test.rb
|
409
|
-
- test/sass/extend_test.rb
|
410
|
-
- test/sass/scss/rx_test.rb
|
413
|
+
- test/sass/importer_test.rb
|
411
414
|
- test/sass/scss/css_test.rb
|
412
415
|
- test/sass/scss/scss_test.rb
|
413
|
-
- test/sass/
|
414
|
-
- test/sass/
|
416
|
+
- test/sass/scss/rx_test.rb
|
417
|
+
- test/sass/util_test.rb
|
418
|
+
- test/sass/script_conversion_test.rb
|
419
|
+
- test/sass/superselector_test.rb
|
415
420
|
- test/sass/encoding_test.rb
|
416
|
-
- test/sass/
|
417
|
-
- test/sass/
|
418
|
-
- test/sass/
|
419
|
-
- test/sass/util/subset_map_test.rb
|
420
|
-
- test/sass/util/multibyte_string_scanner_test.rb
|
421
|
-
- test/sass/functions_test.rb
|
422
|
-
- test/sass/compiler_test.rb
|
423
|
-
- test/sass/css2sass_test.rb
|
421
|
+
- test/sass/cache_test.rb
|
422
|
+
- test/sass/source_map_test.rb
|
423
|
+
- test/sass/plugin_test.rb
|