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
data/lib/sass/features.rb
CHANGED
@@ -4,8 +4,15 @@ module Sass
|
|
4
4
|
# by providing a feature name.
|
5
5
|
module Features
|
6
6
|
# This is the set of features that can be detected.
|
7
|
-
|
8
|
-
|
7
|
+
#
|
8
|
+
# When this is updated, the documentation of `feature-exists()` should be
|
9
|
+
# updated as well.
|
10
|
+
KNOWN_FEATURES = Set[*%w(
|
11
|
+
global-variable-shadowing
|
12
|
+
extend-selector-pseudoclass
|
13
|
+
units-level-3
|
14
|
+
at-error
|
15
|
+
)]
|
9
16
|
|
10
17
|
# Check if a feature exists by name. This is used to implement
|
11
18
|
# the Sass function `feature-exists($feature)`
|
data/lib/sass/importers/base.rb
CHANGED
@@ -90,7 +90,7 @@ module Sass
|
|
90
90
|
#
|
91
91
|
# @param uri [String] The URI of the file to check.
|
92
92
|
# Comes from a `:filename` option set on an engine returned by this importer.
|
93
|
-
# @param options [{Symbol =>
|
93
|
+
# @param options [{Symbol => Object}] Options for the Sass file
|
94
94
|
# containing the `@import` currently being checked.
|
95
95
|
# @return [Time, nil]
|
96
96
|
def mtime(uri, options)
|
@@ -124,6 +124,10 @@ module Sass
|
|
124
124
|
# sourcemap generation to fail if any CSS is generated from files imported
|
125
125
|
# from this importer.
|
126
126
|
#
|
127
|
+
# If an absolute "file:" URI can be produced for an imported file, that
|
128
|
+
# should be preferred to returning `nil`. However, a URL relative to
|
129
|
+
# `sourcemap_directory` should be preferred over an absolute "file:" URI.
|
130
|
+
#
|
127
131
|
# @param uri [String] A URI known to be valid for this importer.
|
128
132
|
# @param sourcemap_directory [String, NilClass] The absolute path to a
|
129
133
|
# directory on disk where the sourcemap will be saved. If uri refers to
|
@@ -131,8 +135,9 @@ module Sass
|
|
131
135
|
# may return a relative URL. This may be `nil` if the sourcemap's
|
132
136
|
# eventual location is unknown.
|
133
137
|
# @return [String?] The publicly-visible URL for this file, or `nil`
|
134
|
-
# indicating that no publicly-visible URL exists.
|
135
|
-
|
138
|
+
# indicating that no publicly-visible URL exists. This should be
|
139
|
+
# appropriately URL-escaped.
|
140
|
+
def public_url(uri, sourcemap_directory)
|
136
141
|
return if @public_url_warning_issued
|
137
142
|
@public_url_warning_issued = true
|
138
143
|
Sass::Util.sass_warn <<WARNING
|
@@ -13,6 +13,7 @@ module Sass
|
|
13
13
|
# This importer will import files relative to this path.
|
14
14
|
def initialize(root)
|
15
15
|
@root = File.expand_path(root)
|
16
|
+
@real_root = Sass::Util.realpath(@root).to_s
|
16
17
|
@same_name_warnings = Set.new
|
17
18
|
end
|
18
19
|
|
@@ -50,7 +51,7 @@ module Sass
|
|
50
51
|
end
|
51
52
|
|
52
53
|
def eql?(other)
|
53
|
-
root.eql?(other.root)
|
54
|
+
!other.nil? && other.respond_to?(:root) && root.eql?(other.root)
|
54
55
|
end
|
55
56
|
|
56
57
|
# @see Base#directories_to_watch
|
@@ -60,22 +61,21 @@ module Sass
|
|
60
61
|
|
61
62
|
# @see Base#watched_file?
|
62
63
|
def watched_file?(filename)
|
63
|
-
|
64
|
-
|
64
|
+
# Check against the root with symlinks resolved, since Listen
|
65
|
+
# returns fully-resolved paths.
|
66
|
+
filename =~ /\.s[ac]ss$/ && filename.start_with?(@real_root + File::SEPARATOR)
|
65
67
|
end
|
66
68
|
|
67
|
-
def public_url(name, sourcemap_directory
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
nil
|
78
|
-
end
|
69
|
+
def public_url(name, sourcemap_directory)
|
70
|
+
file_pathname = Sass::Util.cleanpath(Sass::Util.absolute_path(name, @root))
|
71
|
+
return Sass::Util.file_uri_from_path(file_pathname) if sourcemap_directory.nil?
|
72
|
+
|
73
|
+
sourcemap_pathname = Sass::Util.cleanpath(sourcemap_directory)
|
74
|
+
begin
|
75
|
+
Sass::Util.file_uri_from_path(
|
76
|
+
Sass::Util.relative_path_from(file_pathname, sourcemap_pathname))
|
77
|
+
rescue ArgumentError # when a relative path cannot be constructed
|
78
|
+
Sass::Util.file_uri_from_path(file_pathname)
|
79
79
|
end
|
80
80
|
end
|
81
81
|
|
@@ -122,7 +122,7 @@ module Sass
|
|
122
122
|
end
|
123
123
|
|
124
124
|
# JRuby chokes when trying to import files from JARs when the path starts with './'.
|
125
|
-
ret.map {|f, s| [f.sub(
|
125
|
+
ret.map {|f, s| [f.sub(%r{^\./}, ''), s]}
|
126
126
|
end
|
127
127
|
|
128
128
|
def escape_glob_characters(name)
|
@@ -139,18 +139,21 @@ module Sass
|
|
139
139
|
# @param name [String] The filename to search for.
|
140
140
|
# @return [(String, Symbol)] A filename-syntax pair.
|
141
141
|
def find_real_file(dir, name, options)
|
142
|
-
#
|
142
|
+
# On windows 'dir' or 'name' can be in native File::ALT_SEPARATOR form.
|
143
143
|
dir = dir.gsub(File::ALT_SEPARATOR, File::SEPARATOR) unless File::ALT_SEPARATOR.nil?
|
144
|
+
name = name.gsub(File::ALT_SEPARATOR, File::SEPARATOR) unless File::ALT_SEPARATOR.nil?
|
144
145
|
|
145
146
|
found = possible_files(remove_root(name)).map do |f, s|
|
146
|
-
path =
|
147
|
-
|
147
|
+
path = if dir == "." || Sass::Util.pathname(f).absolute?
|
148
|
+
f
|
149
|
+
else
|
150
|
+
"#{escape_glob_characters(dir)}/#{f}"
|
151
|
+
end
|
148
152
|
Dir[path].map do |full_path|
|
149
153
|
full_path.gsub!(REDUNDANT_DIRECTORY, File::SEPARATOR)
|
150
|
-
[Sass::Util.
|
154
|
+
[Sass::Util.cleanpath(full_path).to_s, s]
|
151
155
|
end
|
152
|
-
end
|
153
|
-
found = Sass::Util.flatten(found, 1)
|
156
|
+
end.flatten(1)
|
154
157
|
return if found.empty?
|
155
158
|
|
156
159
|
if found.size > 1 && !@same_name_warnings.include?(found.first.first)
|
@@ -195,28 +198,17 @@ WARNING
|
|
195
198
|
[dirname, basename, extension]
|
196
199
|
end
|
197
200
|
|
198
|
-
# Issues a warning about being unable to determine a public url.
|
199
|
-
#
|
200
|
-
# @param uri [String] A URI known to be valid for this importer.
|
201
|
-
# @return [NilClass] nil
|
202
|
-
def warn_about_public_url(uri)
|
203
|
-
@warnings_issued ||= Set.new
|
204
|
-
unless @warnings_issued.include?(uri)
|
205
|
-
Sass::Util.sass_warn <<WARNING
|
206
|
-
WARNING: Couldn't determine public URL for "#{uri}" while generating sourcemap.
|
207
|
-
Without a public URL, there's nothing for the source map to link to.
|
208
|
-
WARNING
|
209
|
-
@warnings_issued << uri
|
210
|
-
end
|
211
|
-
nil
|
212
|
-
end
|
213
|
-
|
214
201
|
private
|
215
202
|
|
216
203
|
def _find(dir, name, options)
|
217
204
|
full_filename, syntax = Sass::Util.destructure(find_real_file(dir, name, options))
|
218
205
|
return unless full_filename && File.readable?(full_filename)
|
219
206
|
|
207
|
+
# TODO: this preserves historical behavior, but it's possible
|
208
|
+
# :filename should be either normalized to the native format
|
209
|
+
# or consistently URI-format.
|
210
|
+
full_filename = full_filename.tr("\\", "/") if Sass::Util.windows?
|
211
|
+
|
220
212
|
options[:syntax] = syntax
|
221
213
|
options[:filename] = full_filename
|
222
214
|
options[:importer] = self
|
data/lib/sass/logger/base.rb
CHANGED
@@ -5,6 +5,7 @@ class Sass::Logger::Base
|
|
5
5
|
|
6
6
|
attr_accessor :log_level
|
7
7
|
attr_accessor :disabled
|
8
|
+
attr_accessor :io
|
8
9
|
|
9
10
|
log_level :trace
|
10
11
|
log_level :debug
|
@@ -12,8 +13,9 @@ class Sass::Logger::Base
|
|
12
13
|
log_level :warn
|
13
14
|
log_level :error
|
14
15
|
|
15
|
-
def initialize(log_level = :debug)
|
16
|
+
def initialize(log_level = :debug, io = nil)
|
16
17
|
self.log_level = log_level
|
18
|
+
self.io = io
|
17
19
|
end
|
18
20
|
|
19
21
|
def logging_level?(level)
|
@@ -25,6 +27,10 @@ class Sass::Logger::Base
|
|
25
27
|
end
|
26
28
|
|
27
29
|
def _log(level, message)
|
28
|
-
|
30
|
+
if io
|
31
|
+
io.puts(message)
|
32
|
+
else
|
33
|
+
Kernel.warn(message)
|
34
|
+
end
|
29
35
|
end
|
30
36
|
end
|
@@ -0,0 +1,50 @@
|
|
1
|
+
require 'sass/logger/log_level'
|
2
|
+
|
3
|
+
# A logger that delays messages until they're explicitly flushed to an inner
|
4
|
+
# logger.
|
5
|
+
#
|
6
|
+
# This can be installed around the current logger by calling \{#install!}, and
|
7
|
+
# the original logger can be replaced by calling \{#uninstall!}. The log
|
8
|
+
# messages can be flushed by calling \{#flush}.
|
9
|
+
class Sass::Logger::Delayed < Sass::Logger::Base
|
10
|
+
# Installs a new delayed logger as the current Sass logger, wrapping the
|
11
|
+
# original logger.
|
12
|
+
#
|
13
|
+
# This can be undone by calling \{#uninstall!}.
|
14
|
+
#
|
15
|
+
# @return [Sass::Logger::Delayed] The newly-created logger.
|
16
|
+
def self.install!
|
17
|
+
logger = Sass::Logger::Delayed.new(Sass.logger)
|
18
|
+
Sass.logger = logger
|
19
|
+
logger
|
20
|
+
end
|
21
|
+
|
22
|
+
# Creates a delayed logger wrapping `inner`.
|
23
|
+
#
|
24
|
+
# @param inner [Sass::Logger::Base] The wrapped logger.
|
25
|
+
def initialize(inner)
|
26
|
+
self.log_level = inner.log_level
|
27
|
+
@inner = inner
|
28
|
+
@messages = []
|
29
|
+
end
|
30
|
+
|
31
|
+
# Flushes all queued logs to the wrapped logger.
|
32
|
+
def flush
|
33
|
+
@messages.each {|(l, m)| @inner.log(l, m)}
|
34
|
+
end
|
35
|
+
|
36
|
+
# Uninstalls this logger from \{Sass.logger\}. This should only be called if
|
37
|
+
# the logger was installed using \{#install!}
|
38
|
+
def uninstall!
|
39
|
+
if Sass.logger != self
|
40
|
+
throw Exception.new("Can't uninstall a logger that's not currently installed.")
|
41
|
+
end
|
42
|
+
|
43
|
+
@inner.log_level = log_level
|
44
|
+
Sass.logger = @inner
|
45
|
+
end
|
46
|
+
|
47
|
+
def _log(level, message)
|
48
|
+
@messages << [level, message]
|
49
|
+
end
|
50
|
+
end
|
data/lib/sass/logger.rb
CHANGED
@@ -2,11 +2,16 @@ module Sass::Logger; end
|
|
2
2
|
|
3
3
|
require "sass/logger/log_level"
|
4
4
|
require "sass/logger/base"
|
5
|
+
require "sass/logger/delayed"
|
5
6
|
|
6
7
|
module Sass
|
7
8
|
class << self
|
8
|
-
|
9
|
-
|
9
|
+
def logger=(l)
|
10
|
+
Thread.current[:sass_logger] = l
|
11
|
+
end
|
10
12
|
|
11
|
-
|
13
|
+
def logger
|
14
|
+
Thread.current[:sass_logger] ||= Sass::Logger::Base.new
|
15
|
+
end
|
16
|
+
end
|
12
17
|
end
|
data/lib/sass/media.rb
CHANGED
@@ -205,9 +205,6 @@ module Sass::Media
|
|
205
205
|
# @param options [{Symbol => Object}] An options hash (see {Sass::CSS#initialize}).
|
206
206
|
# @return [String]
|
207
207
|
def self._interp_to_src(interp, options)
|
208
|
-
interp.map
|
209
|
-
next r if r.is_a?(String)
|
210
|
-
"\#{#{r.to_sass(options)}}"
|
211
|
-
end.join
|
208
|
+
interp.map {|r| r.is_a?(String) ? r : r.to_sass(options)}.join
|
212
209
|
end
|
213
210
|
end
|