sass 3.3.0 → 3.4.25
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +3 -1
- data/CODE_OF_CONDUCT.md +10 -0
- data/CONTRIBUTING.md +148 -0
- data/MIT-LICENSE +1 -1
- data/README.md +76 -62
- data/Rakefile +104 -24
- data/VERSION +1 -1
- data/VERSION_DATE +1 -1
- data/VERSION_NAME +1 -1
- data/bin/sass +1 -1
- data/bin/scss +1 -1
- data/extra/sass-spec-ref.sh +32 -0
- data/extra/update_watch.rb +1 -1
- data/lib/sass/cache_stores/filesystem.rb +9 -5
- data/lib/sass/cache_stores/memory.rb +4 -5
- data/lib/sass/callbacks.rb +2 -2
- data/lib/sass/css.rb +12 -13
- data/lib/sass/deprecation.rb +55 -0
- data/lib/sass/engine.rb +106 -70
- data/lib/sass/environment.rb +39 -19
- data/lib/sass/error.rb +17 -20
- data/lib/sass/exec/base.rb +199 -0
- data/lib/sass/exec/sass_convert.rb +283 -0
- data/lib/sass/exec/sass_scss.rb +440 -0
- data/lib/sass/exec.rb +5 -771
- data/lib/sass/features.rb +9 -2
- data/lib/sass/importers/base.rb +8 -3
- data/lib/sass/importers/filesystem.rb +30 -38
- 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/media.rb +1 -4
- data/lib/sass/plugin/compiler.rb +224 -90
- data/lib/sass/plugin/configuration.rb +38 -22
- data/lib/sass/plugin/merb.rb +2 -2
- data/lib/sass/plugin/rack.rb +3 -3
- data/lib/sass/plugin/rails.rb +1 -1
- data/lib/sass/plugin/staleness_checker.rb +4 -4
- data/lib/sass/plugin.rb +6 -5
- data/lib/sass/script/css_lexer.rb +1 -1
- data/lib/sass/script/css_parser.rb +2 -3
- data/lib/sass/script/css_variable_warning.rb +52 -0
- data/lib/sass/script/functions.rb +739 -318
- data/lib/sass/script/lexer.rb +134 -54
- data/lib/sass/script/parser.rb +252 -56
- data/lib/sass/script/tree/funcall.rb +13 -6
- data/lib/sass/script/tree/interpolation.rb +127 -4
- data/lib/sass/script/tree/list_literal.rb +31 -4
- data/lib/sass/script/tree/literal.rb +4 -0
- data/lib/sass/script/tree/node.rb +21 -3
- data/lib/sass/script/tree/operation.rb +54 -1
- data/lib/sass/script/tree/selector.rb +26 -0
- data/lib/sass/script/tree/string_interpolation.rb +59 -38
- data/lib/sass/script/tree/variable.rb +1 -1
- data/lib/sass/script/tree.rb +1 -0
- data/lib/sass/script/value/base.rb +17 -14
- data/lib/sass/script/value/bool.rb +0 -5
- data/lib/sass/script/value/color.rb +78 -42
- data/lib/sass/script/value/helpers.rb +119 -2
- data/lib/sass/script/value/list.rb +0 -15
- data/lib/sass/script/value/map.rb +1 -1
- data/lib/sass/script/value/null.rb +0 -5
- data/lib/sass/script/value/number.rb +112 -31
- data/lib/sass/script/value/string.rb +102 -13
- data/lib/sass/script/value.rb +0 -1
- data/lib/sass/script.rb +3 -3
- data/lib/sass/scss/css_parser.rb +24 -4
- data/lib/sass/scss/parser.rb +290 -383
- data/lib/sass/scss/rx.rb +17 -9
- data/lib/sass/scss/static_parser.rb +306 -4
- data/lib/sass/scss.rb +0 -2
- data/lib/sass/selector/abstract_sequence.rb +35 -18
- data/lib/sass/selector/comma_sequence.rb +114 -19
- data/lib/sass/selector/pseudo.rb +266 -0
- data/lib/sass/selector/sequence.rb +146 -40
- data/lib/sass/selector/simple.rb +22 -33
- data/lib/sass/selector/simple_sequence.rb +122 -39
- data/lib/sass/selector.rb +57 -197
- data/lib/sass/shared.rb +2 -2
- data/lib/sass/source/map.rb +31 -14
- data/lib/sass/source/position.rb +4 -4
- data/lib/sass/stack.rb +2 -8
- data/lib/sass/supports.rb +10 -13
- data/lib/sass/tree/at_root_node.rb +1 -0
- data/lib/sass/tree/charset_node.rb +1 -1
- data/lib/sass/tree/comment_node.rb +1 -1
- data/lib/sass/tree/css_import_node.rb +9 -1
- data/lib/sass/tree/directive_node.rb +8 -2
- data/lib/sass/tree/error_node.rb +18 -0
- data/lib/sass/tree/extend_node.rb +1 -1
- data/lib/sass/tree/function_node.rb +9 -0
- data/lib/sass/tree/import_node.rb +6 -5
- data/lib/sass/tree/keyframe_rule_node.rb +15 -0
- data/lib/sass/tree/node.rb +5 -3
- data/lib/sass/tree/prop_node.rb +6 -7
- data/lib/sass/tree/rule_node.rb +26 -11
- data/lib/sass/tree/visitors/check_nesting.rb +56 -32
- data/lib/sass/tree/visitors/convert.rb +59 -44
- data/lib/sass/tree/visitors/cssize.rb +34 -30
- data/lib/sass/tree/visitors/deep_copy.rb +6 -1
- data/lib/sass/tree/visitors/extend.rb +15 -13
- data/lib/sass/tree/visitors/perform.rb +87 -50
- data/lib/sass/tree/visitors/set_options.rb +15 -1
- data/lib/sass/tree/visitors/to_css.rb +72 -43
- data/lib/sass/util/multibyte_string_scanner.rb +0 -2
- data/lib/sass/util/normalized_map.rb +0 -1
- data/lib/sass/util/subset_map.rb +2 -3
- data/lib/sass/util.rb +334 -154
- data/lib/sass/version.rb +7 -7
- data/lib/sass.rb +10 -8
- data/test/sass/cache_test.rb +62 -20
- data/test/sass/callbacks_test.rb +1 -1
- data/test/sass/compiler_test.rb +24 -11
- data/test/sass/conversion_test.rb +241 -50
- data/test/sass/css2sass_test.rb +73 -5
- data/test/sass/css_variable_test.rb +132 -0
- data/test/sass/encoding_test.rb +219 -0
- data/test/sass/engine_test.rb +343 -260
- data/test/sass/exec_test.rb +12 -2
- data/test/sass/extend_test.rb +333 -44
- data/test/sass/functions_test.rb +353 -260
- data/test/sass/importer_test.rb +40 -21
- data/test/sass/logger_test.rb +1 -1
- data/test/sass/more_results/more_import.css +1 -1
- data/test/sass/more_templates/more1.sass +10 -10
- data/test/sass/more_templates/more_import.sass +2 -2
- data/test/sass/plugin_test.rb +24 -21
- data/test/sass/results/compact.css +1 -1
- data/test/sass/results/complex.css +4 -4
- data/test/sass/results/expanded.css +1 -1
- data/test/sass/results/import.css +1 -1
- data/test/sass/results/import_charset_ibm866.css +2 -2
- data/test/sass/results/mixins.css +17 -17
- data/test/sass/results/nested.css +1 -1
- data/test/sass/results/parent_ref.css +2 -2
- data/test/sass/results/script.css +5 -5
- data/test/sass/results/scss_import.css +1 -1
- data/test/sass/script_conversion_test.rb +71 -39
- data/test/sass/script_test.rb +714 -123
- data/test/sass/scss/css_test.rb +213 -30
- data/test/sass/scss/rx_test.rb +8 -4
- data/test/sass/scss/scss_test.rb +766 -22
- data/test/sass/source_map_test.rb +263 -95
- data/test/sass/superselector_test.rb +210 -0
- data/test/sass/templates/_partial.sass +1 -1
- data/test/sass/templates/basic.sass +10 -10
- data/test/sass/templates/bork1.sass +1 -1
- data/test/sass/templates/bork5.sass +1 -1
- data/test/sass/templates/compact.sass +10 -10
- data/test/sass/templates/complex.sass +187 -187
- data/test/sass/templates/compressed.sass +10 -10
- data/test/sass/templates/expanded.sass +10 -10
- data/test/sass/templates/import.sass +2 -2
- data/test/sass/templates/importee.sass +3 -3
- data/test/sass/templates/mixins.sass +22 -22
- data/test/sass/templates/multiline.sass +4 -4
- data/test/sass/templates/nested.sass +13 -13
- data/test/sass/templates/parent_ref.sass +12 -12
- data/test/sass/templates/script.sass +70 -70
- data/test/sass/templates/scss_import.scss +2 -1
- data/test/sass/templates/subdir/nested_subdir/_nested_partial.sass +1 -1
- data/test/sass/templates/subdir/nested_subdir/nested_subdir.sass +2 -2
- data/test/sass/templates/subdir/subdir.sass +3 -3
- data/test/sass/templates/units.sass +10 -10
- data/test/sass/test_helper.rb +1 -1
- data/test/sass/util/multibyte_string_scanner_test.rb +11 -3
- data/test/sass/util/normalized_map_test.rb +1 -1
- data/test/sass/util/subset_map_test.rb +2 -2
- data/test/sass/util_test.rb +46 -45
- data/test/sass/value_helpers_test.rb +5 -7
- data/test/sass-spec.yml +3 -0
- data/test/test_helper.rb +7 -6
- data/vendor/listen/CHANGELOG.md +1 -228
- data/vendor/listen/Gemfile +5 -15
- data/vendor/listen/README.md +111 -77
- data/vendor/listen/Rakefile +0 -42
- data/vendor/listen/lib/listen/adapter.rb +195 -82
- data/vendor/listen/lib/listen/adapters/bsd.rb +27 -64
- data/vendor/listen/lib/listen/adapters/darwin.rb +21 -58
- data/vendor/listen/lib/listen/adapters/linux.rb +23 -55
- data/vendor/listen/lib/listen/adapters/polling.rb +25 -34
- data/vendor/listen/lib/listen/adapters/windows.rb +50 -46
- data/vendor/listen/lib/listen/directory_record.rb +96 -61
- data/vendor/listen/lib/listen/listener.rb +135 -37
- data/vendor/listen/lib/listen/turnstile.rb +9 -5
- data/vendor/listen/lib/listen/version.rb +1 -1
- data/vendor/listen/lib/listen.rb +33 -19
- data/vendor/listen/listen.gemspec +6 -0
- data/vendor/listen/spec/listen/adapter_spec.rb +43 -77
- data/vendor/listen/spec/listen/adapters/polling_spec.rb +8 -8
- data/vendor/listen/spec/listen/directory_record_spec.rb +81 -56
- data/vendor/listen/spec/listen/listener_spec.rb +128 -39
- data/vendor/listen/spec/listen_spec.rb +15 -21
- data/vendor/listen/spec/spec_helper.rb +4 -0
- data/vendor/listen/spec/support/adapter_helper.rb +52 -15
- data/vendor/listen/spec/support/directory_record_helper.rb +7 -5
- data/vendor/listen/spec/support/listeners_helper.rb +30 -7
- metadata +310 -300
- data/CONTRIBUTING +0 -3
- data/ext/mkrf_conf.rb +0 -27
- data/lib/sass/script/value/deprecated_false.rb +0 -55
- data/lib/sass/scss/script_lexer.rb +0 -15
- data/lib/sass/scss/script_parser.rb +0 -25
- data/vendor/listen/lib/listen/dependency_manager.rb +0 -126
- data/vendor/listen/lib/listen/multi_listener.rb +0 -143
- data/vendor/listen/spec/listen/dependency_manager_spec.rb +0 -107
- data/vendor/listen/spec/listen/multi_listener_spec.rb +0 -174
@@ -12,8 +12,10 @@ class Sass::Tree::Visitors::ToCss < Sass::Tree::Visitors::Base
|
|
12
12
|
@tabs = 0
|
13
13
|
@line = 1
|
14
14
|
@offset = 1
|
15
|
-
@result = ""
|
16
|
-
@source_mapping = Sass::Source::Map.new
|
15
|
+
@result = String.new("")
|
16
|
+
@source_mapping = build_source_mapping ? Sass::Source::Map.new : nil
|
17
|
+
@lstrip = nil
|
18
|
+
@in_directive = false
|
17
19
|
end
|
18
20
|
|
19
21
|
# Runs the visitor on `node`.
|
@@ -51,6 +53,10 @@ class Sass::Tree::Visitors::ToCss < Sass::Tree::Visitors::Base
|
|
51
53
|
@source_mapping.add(source_range, target_range)
|
52
54
|
end
|
53
55
|
|
56
|
+
def trailing_semicolon?
|
57
|
+
@result.end_with?(";") && !@result.end_with?('\;')
|
58
|
+
end
|
59
|
+
|
54
60
|
# Move the output cursor back `chars` characters.
|
55
61
|
def erase!(chars)
|
56
62
|
return if chars == 0
|
@@ -98,7 +104,7 @@ class Sass::Tree::Visitors::ToCss < Sass::Tree::Visitors::Base
|
|
98
104
|
@lstrip = true
|
99
105
|
yield
|
100
106
|
ensure
|
101
|
-
@lstrip
|
107
|
+
@lstrip &&= old_lstrip
|
102
108
|
end
|
103
109
|
|
104
110
|
# Prepend `prefix` to the output string.
|
@@ -116,32 +122,30 @@ class Sass::Tree::Visitors::ToCss < Sass::Tree::Visitors::Base
|
|
116
122
|
node.children.each do |child|
|
117
123
|
next if child.invisible?
|
118
124
|
visit(child)
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
end
|
124
|
-
end
|
125
|
+
next if node.style == :compressed
|
126
|
+
output "\n"
|
127
|
+
next unless child.is_a?(Sass::Tree::DirectiveNode) && child.has_children && !child.bubbles?
|
128
|
+
output "\n"
|
125
129
|
end
|
126
130
|
rstrip!
|
131
|
+
if node.style == :compressed && trailing_semicolon?
|
132
|
+
erase! 1
|
133
|
+
end
|
127
134
|
return "" if @result.empty?
|
128
135
|
|
129
136
|
output "\n"
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
#
|
136
|
-
|
137
|
-
|
138
|
-
|
137
|
+
|
138
|
+
unless Sass::Util.ruby1_8? || @result.ascii_only?
|
139
|
+
if node.style == :compressed
|
140
|
+
# A byte order mark is sufficient to tell browsers that this
|
141
|
+
# file is UTF-8 encoded, and will override any other detection
|
142
|
+
# methods as per http://encoding.spec.whatwg.org/#decode-and-encode.
|
143
|
+
prepend! "\uFEFF"
|
144
|
+
else
|
145
|
+
prepend! "@charset \"UTF-8\";\n"
|
139
146
|
end
|
140
147
|
end
|
141
148
|
|
142
|
-
prepend! "@charset \"#{@result.encoding.name}\";#{
|
143
|
-
node.style == :compressed ? '' : "\n"
|
144
|
-
}".encode(@result.encoding)
|
145
149
|
@result
|
146
150
|
rescue Sass::SyntaxError => e
|
147
151
|
e.sass_template ||= node.template
|
@@ -155,13 +159,14 @@ class Sass::Tree::Visitors::ToCss < Sass::Tree::Visitors::Base
|
|
155
159
|
def visit_comment(node)
|
156
160
|
return if node.invisible?
|
157
161
|
spaces = (' ' * [@tabs - node.resolved_value[/^ */].size, 0].max)
|
162
|
+
output(spaces)
|
158
163
|
|
159
|
-
content = node.resolved_value.
|
164
|
+
content = node.resolved_value.split("\n").join("\n" + spaces)
|
160
165
|
if node.type == :silent
|
161
|
-
content.gsub!(%r{^(\s*)//(.*)$}) {
|
166
|
+
content.gsub!(%r{^(\s*)//(.*)$}) {"#{$1}/*#{$2} */"}
|
162
167
|
end
|
163
168
|
if (node.style == :compact || node.style == :compressed) && node.type != :loud
|
164
|
-
content.gsub!(
|
169
|
+
content.gsub!(%r{\n +(\* *(?!/))?}, ' ')
|
165
170
|
end
|
166
171
|
for_node(node) {output(content)}
|
167
172
|
end
|
@@ -174,28 +179,32 @@ class Sass::Tree::Visitors::ToCss < Sass::Tree::Visitors::Base
|
|
174
179
|
if !node.has_children || node.children.empty?
|
175
180
|
output(tab_str)
|
176
181
|
for_node(node) {output(node.resolved_value)}
|
177
|
-
|
182
|
+
if node.has_children
|
183
|
+
output("#{' ' unless node.style == :compressed}{}")
|
184
|
+
elsif node.children.empty?
|
185
|
+
output(";")
|
186
|
+
end
|
178
187
|
return
|
179
188
|
end
|
180
189
|
|
181
|
-
@in_directive
|
190
|
+
@in_directive ||= !node.is_a?(Sass::Tree::MediaNode)
|
182
191
|
output(tab_str) if node.style != :compressed
|
183
192
|
for_node(node) {output(node.resolved_value)}
|
184
193
|
output(node.style == :compressed ? "{" : " {")
|
185
194
|
output(node.style == :compact ? ' ' : "\n") if node.style != :compressed
|
186
195
|
|
187
|
-
|
196
|
+
had_children = true
|
188
197
|
first = true
|
189
198
|
node.children.each do |child|
|
190
199
|
next if child.invisible?
|
191
200
|
if node.style == :compact
|
192
201
|
if child.is_a?(Sass::Tree::PropNode)
|
193
|
-
with_tabs(first ||
|
202
|
+
with_tabs(first || !had_children ? 0 : @tabs + 1) do
|
194
203
|
visit(child)
|
195
204
|
output(' ')
|
196
205
|
end
|
197
206
|
else
|
198
|
-
|
207
|
+
unless had_children
|
199
208
|
erase! 1
|
200
209
|
output "\n"
|
201
210
|
end
|
@@ -209,18 +218,23 @@ class Sass::Tree::Visitors::ToCss < Sass::Tree::Visitors::Base
|
|
209
218
|
rstrip!
|
210
219
|
output "\n"
|
211
220
|
end
|
212
|
-
|
221
|
+
had_children = child.has_children
|
213
222
|
first = false
|
214
223
|
elsif node.style == :compressed
|
215
|
-
|
224
|
+
unless had_children
|
225
|
+
output(";") unless trailing_semicolon?
|
226
|
+
end
|
216
227
|
with_tabs(0) {visit(child)}
|
217
|
-
|
228
|
+
had_children = child.has_children
|
218
229
|
else
|
219
230
|
with_tabs(@tabs + 1) {visit(child)}
|
220
231
|
output "\n"
|
221
232
|
end
|
222
233
|
end
|
223
234
|
rstrip!
|
235
|
+
if node.style == :compressed && trailing_semicolon?
|
236
|
+
erase! 1
|
237
|
+
end
|
224
238
|
if node.style == :expanded
|
225
239
|
output("\n#{tab_str}")
|
226
240
|
elsif node.style != :compressed
|
@@ -235,7 +249,7 @@ class Sass::Tree::Visitors::ToCss < Sass::Tree::Visitors::Base
|
|
235
249
|
|
236
250
|
def visit_media(node)
|
237
251
|
with_tabs(@tabs + node.tabs) {visit_directive(node)}
|
238
|
-
output("\n") if node.group_end
|
252
|
+
output("\n") if node.style != :compressed && node.group_end
|
239
253
|
end
|
240
254
|
|
241
255
|
def visit_supports(node)
|
@@ -281,10 +295,13 @@ class Sass::Tree::Visitors::ToCss < Sass::Tree::Visitors::Base
|
|
281
295
|
|
282
296
|
joined_rules = node.resolved_rules.members.map do |seq|
|
283
297
|
next if seq.has_placeholder?
|
284
|
-
rule_part = seq.
|
298
|
+
rule_part = seq.to_s(:style => node.style)
|
285
299
|
if node.style == :compressed
|
286
300
|
rule_part.gsub!(/([^,])\s*\n\s*/m, '\1 ')
|
287
|
-
rule_part.gsub!(/\s*([
|
301
|
+
rule_part.gsub!(/\s*([+>])\s*/m, '\1')
|
302
|
+
rule_part.gsub!(/nth([^( ]*)\(([^)]*)\)/m) do |match|
|
303
|
+
match.tr(" \t\n", "")
|
304
|
+
end
|
288
305
|
rule_part.strip!
|
289
306
|
end
|
290
307
|
rule_part
|
@@ -309,8 +326,8 @@ class Sass::Tree::Visitors::ToCss < Sass::Tree::Visitors::Base
|
|
309
326
|
relative_filename =
|
310
327
|
if node.options[:css_filename]
|
311
328
|
begin
|
312
|
-
Sass::Util.
|
313
|
-
|
329
|
+
Sass::Util.relative_path_from(
|
330
|
+
node.filename, File.dirname(node.options[:css_filename])).to_s
|
314
331
|
rescue ArgumentError
|
315
332
|
nil
|
316
333
|
end
|
@@ -323,7 +340,7 @@ class Sass::Tree::Visitors::ToCss < Sass::Tree::Visitors::Base
|
|
323
340
|
end
|
324
341
|
end
|
325
342
|
|
326
|
-
end_props, trailer, tabs
|
343
|
+
end_props, trailer, tabs = '', '', 0
|
327
344
|
if node.style == :compact
|
328
345
|
separator, end_props, bracket = ' ', ' ', ' { '
|
329
346
|
trailer = "\n" if node.group_end
|
@@ -341,10 +358,18 @@ class Sass::Tree::Visitors::ToCss < Sass::Tree::Visitors::Base
|
|
341
358
|
|
342
359
|
with_tabs(tabs) do
|
343
360
|
node.children.each_with_index do |child, i|
|
344
|
-
|
361
|
+
if i > 0
|
362
|
+
if separator.start_with?(";") && trailing_semicolon?
|
363
|
+
erase! 1
|
364
|
+
end
|
365
|
+
output(separator)
|
366
|
+
end
|
345
367
|
visit(child)
|
346
368
|
end
|
347
369
|
end
|
370
|
+
if node.style == :compressed && trailing_semicolon?
|
371
|
+
erase! 1
|
372
|
+
end
|
348
373
|
|
349
374
|
output(end_props)
|
350
375
|
output("}" + trailer)
|
@@ -353,6 +378,10 @@ class Sass::Tree::Visitors::ToCss < Sass::Tree::Visitors::Base
|
|
353
378
|
# @comment
|
354
379
|
# rubocop:enable MethodLength
|
355
380
|
|
381
|
+
def visit_keyframerule(node)
|
382
|
+
visit_directive(node)
|
383
|
+
end
|
384
|
+
|
356
385
|
private
|
357
386
|
|
358
387
|
def debug_info_rule(debug_info, options)
|
@@ -361,10 +390,10 @@ class Sass::Tree::Visitors::ToCss < Sass::Tree::Visitors::Base
|
|
361
390
|
rule = Sass::Tree::RuleNode.new([""])
|
362
391
|
rule.resolved_rules = Sass::Selector::CommaSequence.new(
|
363
392
|
[Sass::Selector::Sequence.new(
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
393
|
+
[Sass::Selector::SimpleSequence.new(
|
394
|
+
[Sass::Selector::Element.new(k.to_s.gsub(/[^\w-]/, "\\\\\\0"), nil)],
|
395
|
+
false)
|
396
|
+
])
|
368
397
|
])
|
369
398
|
prop = Sass::Tree::PropNode.new([""], Sass::Script::Value::String.new(''), :new)
|
370
399
|
prop.resolved_name = "font-family"
|
@@ -1,9 +1,7 @@
|
|
1
1
|
require 'strscan'
|
2
2
|
|
3
3
|
if Sass::Util.ruby1_8?
|
4
|
-
# rubocop:disable ConstantName
|
5
4
|
Sass::Util::MultibyteStringScanner = StringScanner
|
6
|
-
# rubocop:enable ConstantName
|
7
5
|
else
|
8
6
|
if Sass::Util.rbx?
|
9
7
|
# Rubinius's StringScanner class implements some of its methods in terms of
|
data/lib/sass/util/subset_map.rb
CHANGED
@@ -59,7 +59,7 @@ module Sass
|
|
59
59
|
#
|
60
60
|
# In the worst case, this runs in `O(m*max(n, log m))` time,
|
61
61
|
# where `n` is the size of `set`
|
62
|
-
# and `m` is the number of
|
62
|
+
# and `m` is the number of associations in the map.
|
63
63
|
# However, unless many keys in the map overlap with `set`,
|
64
64
|
# `m` will typically be much smaller.
|
65
65
|
#
|
@@ -78,8 +78,7 @@ module Sass
|
|
78
78
|
next unless subset.subset?(set)
|
79
79
|
[index, subenum]
|
80
80
|
end
|
81
|
-
end
|
82
|
-
res = Sass::Util.flatten(res, 1)
|
81
|
+
end.flatten(1)
|
83
82
|
res.compact!
|
84
83
|
res.uniq!
|
85
84
|
res.sort!
|