sass 3.4.14 → 3.4.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -13
- data/README.md +1 -1
- data/VERSION +1 -1
- data/VERSION_DATE +1 -1
- data/lib/sass/engine.rb +10 -0
- data/lib/sass/exec/sass_scss.rb +3 -0
- data/lib/sass/importers.rb +1 -0
- data/lib/sass/importers/deprecated_path.rb +51 -0
- data/lib/sass/script/functions.rb +20 -2
- data/lib/sass/script/value/color.rb +4 -4
- data/lib/sass/selector/sequence.rb +1 -1
- data/lib/sass/util.rb +11 -0
- data/test/sass/results/script.css +1 -1
- metadata +18 -16
checksums.yaml
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
data.tar.gz: !binary |-
|
6
|
-
MzMxNGY0ZTk1ZDdhYjFmNTYwOGY3MjUyN2I2NjQ5NGIwNGIxZDlhNg==
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 00cf7afef986f13c1fccaf0cf889a398d7b86910
|
4
|
+
data.tar.gz: 34e170181ba5a960190d6e87f2e6707557383ed9
|
7
5
|
SHA512:
|
8
|
-
metadata.gz:
|
9
|
-
|
10
|
-
MWEwMzdmY2M1ZmZmYTg3NmY0NDZlYTEzYjgxYTlkZjA4NzkwN2RkNjAxNDFh
|
11
|
-
Yjk5MGVjMGY5MTIyYjgwYjdkMmI1YTU5MzM0Zjg2ODY5YWY0ZTc=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
Yzc0NTE0NWMwMjg4MWY5MTkwMjY4ODY0ZTBmOTIzZWJiMDJkNWM5NzJjYWEy
|
14
|
-
OTBiYzBiYTRlYTFjODdmNThmOTMxMzI0ZmM5ZjYxMDk4NWY5OThkNTJmMGZl
|
15
|
-
NTcyNjQ1NGJjZGQ4MTQ5NjhmMzc1OGQ1NTIyMTMwZTRlYmJmMmQ=
|
6
|
+
metadata.gz: 363cd78182ff5dd174b78914436f98cd7c14bb60418103a0f1a46392aa3ef6daf5cd0c09e9ca43ce3b3762ca90046d3d31ee0246f3beaa52ee35828d4306be27
|
7
|
+
data.tar.gz: 231f3556d06f74cd61b355cfb4143549100bb01efd944de3b781e6f256d6feed534582460f9abfcc9ec994cd901bdfcbf110019eb6db33e11b8794483d38bcad
|
data/README.md
CHANGED
@@ -199,7 +199,7 @@ and now occasionally consults on the language issues. Hampton lives in San
|
|
199
199
|
Francisco, California and works as VP of Technology
|
200
200
|
at [Moovweb](http://www.moovweb.com/).
|
201
201
|
|
202
|
-
[Natalie Weizenbaum](
|
202
|
+
[Natalie Weizenbaum](https://twitter.com/nex3) is the primary developer and architect of
|
203
203
|
Sass. Her hard work has kept the project alive by endlessly answering forum
|
204
204
|
posts, fixing bugs, refactoring, finding speed improvements, writing
|
205
205
|
documentation, implementing new features, and getting Hampton coffee (a fitting
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.4.
|
1
|
+
3.4.15
|
data/VERSION_DATE
CHANGED
@@ -1 +1 @@
|
|
1
|
-
23
|
1
|
+
23 June 2015 00:43:28 UTC
|
data/lib/sass/engine.rb
CHANGED
@@ -192,6 +192,16 @@ module Sass
|
|
192
192
|
options[:filesystem_importer].new(p.to_s)
|
193
193
|
end
|
194
194
|
|
195
|
+
# Remove any deprecated importers if the location is imported explicitly
|
196
|
+
options[:load_paths].reject! do |importer|
|
197
|
+
importer.is_a?(Sass::Importers::DeprecatedPath) &&
|
198
|
+
options[:load_paths].find do |other_importer|
|
199
|
+
other_importer.is_a?(Sass::Importers::Filesystem) &&
|
200
|
+
other_importer != importer &&
|
201
|
+
other_importer.root == importer.root
|
202
|
+
end
|
203
|
+
end
|
204
|
+
|
195
205
|
# Backwards compatibility
|
196
206
|
options[:property_syntax] ||= options[:attribute_syntax]
|
197
207
|
case options[:property_syntax]
|
data/lib/sass/exec/sass_scss.rb
CHANGED
@@ -174,6 +174,9 @@ MESSAGE
|
|
174
174
|
'Read input from standard input instead of an input file.',
|
175
175
|
'This is the default if no input file is specified.') do
|
176
176
|
@options[:input] = $stdin
|
177
|
+
|
178
|
+
# See issue 1745
|
179
|
+
(@options[:for_engine][:load_paths] ||= []) << ::Sass::Importers::DeprecatedPath.new(".")
|
177
180
|
end
|
178
181
|
|
179
182
|
encoding_option(opts)
|
data/lib/sass/importers.rb
CHANGED
@@ -0,0 +1,51 @@
|
|
1
|
+
module Sass
|
2
|
+
module Importers
|
3
|
+
# This importer emits a deprecation warning the first time it is used to
|
4
|
+
# import a file. It is used to deprecate the current working
|
5
|
+
# directory from the list of automatic sass load paths.
|
6
|
+
class DeprecatedPath < Filesystem
|
7
|
+
# @param root [String] The absolute, expanded path to the folder that is deprecated.
|
8
|
+
def initialize(root)
|
9
|
+
@specified_root = root
|
10
|
+
@warning_given = false
|
11
|
+
super
|
12
|
+
end
|
13
|
+
|
14
|
+
# @see Sass::Importers::Base#find
|
15
|
+
def find(*args)
|
16
|
+
found = super
|
17
|
+
if found && !@warning_given
|
18
|
+
@warning_given = true
|
19
|
+
Sass::Util.sass_warn deprecation_warning
|
20
|
+
end
|
21
|
+
found
|
22
|
+
end
|
23
|
+
|
24
|
+
# @see Base#directories_to_watch
|
25
|
+
def directories_to_watch
|
26
|
+
# The current working directory was not watched in Sass 3.2,
|
27
|
+
# so we continue not to watch it while it's deprecated.
|
28
|
+
[]
|
29
|
+
end
|
30
|
+
|
31
|
+
# @see Sass::Importers::Base#to_s
|
32
|
+
def to_s
|
33
|
+
"#{@root} (DEPRECATED)"
|
34
|
+
end
|
35
|
+
|
36
|
+
protected
|
37
|
+
|
38
|
+
# @return [String] The deprecation warning that will be printed the first
|
39
|
+
# time an import occurs.
|
40
|
+
def deprecation_warning
|
41
|
+
path = @specified_root == "." ? "the current working directory" : @specified_root
|
42
|
+
<<WARNING
|
43
|
+
DEPRECATION WARNING: Importing from #{path} will not be
|
44
|
+
automatic in future versions of Sass. To avoid future errors, you can add it
|
45
|
+
to your environment explicitly by setting `SASS_PATH=#{@specified_root}`, by using the -I command
|
46
|
+
line option, or by changing your Sass configuration options.
|
47
|
+
WARNING
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
@@ -162,6 +162,9 @@ module Sass::Script
|
|
162
162
|
#
|
163
163
|
# ## List Functions {#list-functions}
|
164
164
|
#
|
165
|
+
# Lists in Sass are immutable; all list functions return a new list rather
|
166
|
+
# than updating the existing list in-place.
|
167
|
+
#
|
165
168
|
# All list functions work for maps as well, treating them as lists of pairs.
|
166
169
|
#
|
167
170
|
# \{#length length($list)}
|
@@ -190,6 +193,9 @@ module Sass::Script
|
|
190
193
|
#
|
191
194
|
# ## Map Functions {#map-functions}
|
192
195
|
#
|
196
|
+
# Maps in Sass are immutable; all map functions return a new map rather than
|
197
|
+
# updating the existing map in-place.
|
198
|
+
#
|
193
199
|
# \{#map_get map-get($map, $key)}
|
194
200
|
# : Returns the value in a map associated with a given key.
|
195
201
|
#
|
@@ -1057,7 +1063,7 @@ module Sass::Script
|
|
1057
1063
|
# @raise [ArgumentError] if `$color` isn't a color
|
1058
1064
|
def ie_hex_str(color)
|
1059
1065
|
assert_type color, :Color, :color
|
1060
|
-
alpha = (color.alpha * 255).
|
1066
|
+
alpha = Sass::Util.round(color.alpha * 255).to_s(16).rjust(2, '0')
|
1061
1067
|
identifier("##{alpha}#{color.send(:hex_str)[1..-1]}".upcase)
|
1062
1068
|
end
|
1063
1069
|
declare :ie_hex_str, [:color]
|
@@ -1716,7 +1722,7 @@ MESSAGE
|
|
1716
1722
|
# @return [Sass::Script::Value::Number]
|
1717
1723
|
# @raise [ArgumentError] if `$number` isn't a number
|
1718
1724
|
def round(number)
|
1719
|
-
numeric_transformation(number) {|n|
|
1725
|
+
numeric_transformation(number) {|n| Sass::Util.round(n)}
|
1720
1726
|
end
|
1721
1727
|
declare :round, [:number]
|
1722
1728
|
|
@@ -1879,6 +1885,9 @@ MESSAGE
|
|
1879
1885
|
# list. If both lists have fewer than two items, spaces are used for the
|
1880
1886
|
# resulting list.
|
1881
1887
|
#
|
1888
|
+
# Like all list functions, `join()` returns a new list rather than modifying
|
1889
|
+
# its arguments in place.
|
1890
|
+
#
|
1882
1891
|
# @example
|
1883
1892
|
# join(10px 20px, 30px 40px) => 10px 20px 30px 40px
|
1884
1893
|
# join((blue, red), (#abc, #def)) => blue, red, #abc, #def
|
@@ -1912,6 +1921,9 @@ MESSAGE
|
|
1912
1921
|
# Unless the `$separator` argument is passed, if the list had only one item,
|
1913
1922
|
# the resulting list will be space-separated.
|
1914
1923
|
#
|
1924
|
+
# Like all list functions, `append()` returns a new list rather than
|
1925
|
+
# modifying its argument in place.
|
1926
|
+
#
|
1915
1927
|
# @example
|
1916
1928
|
# append(10px 20px, 30px) => 10px 20px 30px
|
1917
1929
|
# append((blue, red), green) => blue, red, green
|
@@ -2035,6 +2047,9 @@ MESSAGE
|
|
2035
2047
|
# same order as in `$map1`. New keys from `$map2` will be placed at the end
|
2036
2048
|
# of the map.
|
2037
2049
|
#
|
2050
|
+
# Like all map functions, `map-merge()` returns a new map rather than
|
2051
|
+
# modifying its arguments in place.
|
2052
|
+
#
|
2038
2053
|
# @example
|
2039
2054
|
# map-merge(("foo": 1), ("bar": 2)) => ("foo": 1, "bar": 2)
|
2040
2055
|
# map-merge(("foo": 1, "bar": 2), ("bar": 3)) => ("foo": 1, "bar": 3)
|
@@ -2052,6 +2067,9 @@ MESSAGE
|
|
2052
2067
|
|
2053
2068
|
# Returns a new map with keys removed.
|
2054
2069
|
#
|
2070
|
+
# Like all map functions, `map-merge()` returns a new map rather than
|
2071
|
+
# modifying its arguments in place.
|
2072
|
+
#
|
2055
2073
|
# @example
|
2056
2074
|
# map-remove(("foo": 1, "bar": 2), "bar") => ("foo": 1)
|
2057
2075
|
# map-remove(("foo": 1, "bar": 2, "baz": 3), "bar", "baz") => ("foo": 1)
|
@@ -232,7 +232,7 @@ module Sass::Script::Value
|
|
232
232
|
raise ArgumentError.new("Color.new(array) expects a three- or four-element array")
|
233
233
|
end
|
234
234
|
|
235
|
-
red, green, blue = attrs[0...3].map {|c|
|
235
|
+
red, green, blue = attrs[0...3].map {|c| Sass::Util.round(c)}
|
236
236
|
@attrs = {:red => red, :green => green, :blue => blue}
|
237
237
|
@attrs[:alpha] = attrs[3] ? attrs[3].to_f : 1
|
238
238
|
@representation = representation
|
@@ -258,7 +258,7 @@ module Sass::Script::Value
|
|
258
258
|
|
259
259
|
[:red, :green, :blue].each do |k|
|
260
260
|
next if @attrs[k].nil?
|
261
|
-
@attrs[k] = Sass::Util.restrict(@attrs[k]
|
261
|
+
@attrs[k] = Sass::Util.restrict(Sass::Util.round(@attrs[k]), 0..255)
|
262
262
|
end
|
263
263
|
|
264
264
|
[:saturation, :lightness].each do |k|
|
@@ -607,7 +607,7 @@ module Sass::Script::Value
|
|
607
607
|
|
608
608
|
result = []
|
609
609
|
(0...3).each do |i|
|
610
|
-
res = rgb[i].send(operation, other_num ? other.value : other.rgb[i])
|
610
|
+
res = rgb[i].to_f.send(operation, other_num ? other.value : other.rgb[i])
|
611
611
|
result[i] = [[res, 255].min, 0].max
|
612
612
|
end
|
613
613
|
|
@@ -632,7 +632,7 @@ module Sass::Script::Value
|
|
632
632
|
hue_to_rgb(m1, m2, h + 1.0 / 3),
|
633
633
|
hue_to_rgb(m1, m2, h),
|
634
634
|
hue_to_rgb(m1, m2, h - 1.0 / 3)
|
635
|
-
].map {|c| (c * 0xff)
|
635
|
+
].map {|c| Sass::Util.round(c * 0xff)}
|
636
636
|
end
|
637
637
|
|
638
638
|
def hue_to_rgb(m1, m2, h)
|
data/lib/sass/util.rb
CHANGED
@@ -138,6 +138,17 @@ module Sass
|
|
138
138
|
[[value, range.first].max, range.last].min
|
139
139
|
end
|
140
140
|
|
141
|
+
# Like [Fixnum.round], but leaves rooms for slight floating-point
|
142
|
+
# differences.
|
143
|
+
#
|
144
|
+
# @param value [Numeric]
|
145
|
+
# @return [Numeric]
|
146
|
+
def round(value)
|
147
|
+
# If the number is within epsilon of X.5, round up.
|
148
|
+
return value.ceil if (value % 1) - 0.5 > -0.00001
|
149
|
+
value.round
|
150
|
+
end
|
151
|
+
|
141
152
|
# Concatenates all strings that are adjacent in an array,
|
142
153
|
# while leaving other elements as they are.
|
143
154
|
#
|
@@ -7,7 +7,7 @@
|
|
7
7
|
|
8
8
|
#times { num-num: 7; num-col: #7496b8; col-num: #092345; col-col: #243648; }
|
9
9
|
|
10
|
-
#div { num-num: 3.33333; num-num2: 3.33333; col-num: #092345; col-col: #
|
10
|
+
#div { num-num: 3.33333; num-num2: 3.33333; col-num: #092345; col-col: #0b0e10; comp: 1px; }
|
11
11
|
|
12
12
|
#mod { num-num: 2; col-col: #0f0e05; col-num: #020001; }
|
13
13
|
|
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.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Natalie Weizenbaum
|
@@ -10,54 +10,55 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2015-
|
13
|
+
date: 2015-06-23 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
|
-
|
57
|
+
description: |2
|
58
|
+
Sass makes CSS fun again. Sass is an extension of CSS3, adding
|
59
|
+
nested rules, variables, mixins, selector inheritance, and more.
|
60
|
+
It's translated to well-formatted, standard CSS using the
|
61
|
+
command line tool or a web-framework plugin.
|
61
62
|
email: sass-lang@googlegroups.com
|
62
63
|
executables:
|
63
64
|
- sass
|
@@ -66,7 +67,7 @@ executables:
|
|
66
67
|
extensions: []
|
67
68
|
extra_rdoc_files: []
|
68
69
|
files:
|
69
|
-
- .yardopts
|
70
|
+
- ".yardopts"
|
70
71
|
- CONTRIBUTING.md
|
71
72
|
- MIT-LICENSE
|
72
73
|
- README.md
|
@@ -99,6 +100,7 @@ files:
|
|
99
100
|
- lib/sass/features.rb
|
100
101
|
- lib/sass/importers.rb
|
101
102
|
- lib/sass/importers/base.rb
|
103
|
+
- lib/sass/importers/deprecated_path.rb
|
102
104
|
- lib/sass/importers/filesystem.rb
|
103
105
|
- lib/sass/logger.rb
|
104
106
|
- lib/sass/logger/base.rb
|
@@ -380,17 +382,17 @@ require_paths:
|
|
380
382
|
- lib
|
381
383
|
required_ruby_version: !ruby/object:Gem::Requirement
|
382
384
|
requirements:
|
383
|
-
- -
|
385
|
+
- - ">="
|
384
386
|
- !ruby/object:Gem::Version
|
385
387
|
version: 1.8.7
|
386
388
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
387
389
|
requirements:
|
388
|
-
- -
|
390
|
+
- - ">="
|
389
391
|
- !ruby/object:Gem::Version
|
390
392
|
version: '0'
|
391
393
|
requirements: []
|
392
394
|
rubyforge_project: sass
|
393
|
-
rubygems_version: 2.4.
|
395
|
+
rubygems_version: 2.4.5
|
394
396
|
signing_key:
|
395
397
|
specification_version: 4
|
396
398
|
summary: A powerful but elegant CSS compiler that makes CSS fun again.
|