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/test/sass/importer_test.rb
CHANGED
@@ -4,7 +4,7 @@ require File.dirname(__FILE__) + '/test_helper'
|
|
4
4
|
require 'mock_importer'
|
5
5
|
require 'sass/plugin'
|
6
6
|
|
7
|
-
class ImporterTest < Test
|
7
|
+
class ImporterTest < MiniTest::Test
|
8
8
|
|
9
9
|
class FruitImporter < Sass::Importers::Base
|
10
10
|
def find(name, context = nil)
|
@@ -225,11 +225,11 @@ SCSS
|
|
225
225
|
JSON
|
226
226
|
end
|
227
227
|
|
228
|
-
def
|
228
|
+
def test_source_map_with_only_css_uri_can_have_no_public_url
|
229
229
|
ephemeral_importer = NoPublicUrlImporter.new
|
230
230
|
mock_importer = MockImporter.new
|
231
231
|
def mock_importer.public_url(name, sourcemap_directory = nil)
|
232
|
-
"
|
232
|
+
"source_uri"
|
233
233
|
end
|
234
234
|
|
235
235
|
options = {
|
@@ -248,28 +248,26 @@ JSON
|
|
248
248
|
}
|
249
249
|
SCSS
|
250
250
|
|
251
|
-
|
252
|
-
|
253
|
-
assert_equal <<CSS.strip, css_output.strip
|
251
|
+
css_output, sourcemap = engine.render_with_sourcemap('sourcemap_uri')
|
252
|
+
assert_equal <<CSS.strip, css_output.strip
|
254
253
|
.orange {
|
255
254
|
color: orange; }
|
256
255
|
|
257
256
|
/*# sourceMappingURL=sourcemap_uri */
|
258
257
|
CSS
|
259
|
-
|
260
|
-
|
258
|
+
map = sourcemap.to_json(:css_uri => 'css_uri')
|
259
|
+
assert_equal <<JSON.strip, map
|
261
260
|
{
|
262
261
|
"version": 3,
|
263
262
|
"mappings": "AACA,OAAQ",
|
264
|
-
"sources": ["
|
263
|
+
"sources": ["source_uri"],
|
265
264
|
"names": [],
|
266
265
|
"file": "css_uri"
|
267
266
|
}
|
268
267
|
JSON
|
269
|
-
end
|
270
268
|
end
|
271
269
|
|
272
|
-
def
|
270
|
+
def test_source_map_with_only_css_uri_falls_back_to_file_uris
|
273
271
|
file_system_importer = Sass::Importers::Filesystem.new('.')
|
274
272
|
options = {
|
275
273
|
:filename => filename_for_test(:scss),
|
@@ -284,13 +282,19 @@ SCSS
|
|
284
282
|
|
285
283
|
_, sourcemap = engine.render_with_sourcemap('http://1.example.com/style.map')
|
286
284
|
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
285
|
+
uri = Sass::Util.file_uri_from_path(Sass::Util.absolute_path(filename_for_test(:scss)))
|
286
|
+
assert_equal <<JSON.strip, sourcemap.to_json(:css_uri => 'css_uri')
|
287
|
+
{
|
288
|
+
"version": 3,
|
289
|
+
"mappings": "AAAA,IAAK;EAAC,CAAC,EAAE,CAAC",
|
290
|
+
"sources": ["#{uri}"],
|
291
|
+
"names": [],
|
292
|
+
"file": "css_uri"
|
293
|
+
}
|
294
|
+
JSON
|
291
295
|
end
|
292
296
|
|
293
|
-
def
|
297
|
+
def test_source_map_with_css_uri_and_css_path_falls_back_to_file_uris
|
294
298
|
file_system_importer = Sass::Importers::Filesystem.new('.')
|
295
299
|
options = {
|
296
300
|
:filename => filename_for_test(:scss),
|
@@ -305,10 +309,16 @@ SCSS
|
|
305
309
|
|
306
310
|
_, sourcemap = engine.render_with_sourcemap('http://1.example.com/style.map')
|
307
311
|
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
+
uri = Sass::Util.file_uri_from_path(Sass::Util.absolute_path(filename_for_test(:scss)))
|
313
|
+
assert_equal <<JSON.strip, sourcemap.to_json(:css_uri => 'css_uri', :css_path => 'css_path')
|
314
|
+
{
|
315
|
+
"version": 3,
|
316
|
+
"mappings": "AAAA,IAAK;EAAC,CAAC,EAAE,CAAC",
|
317
|
+
"sources": ["#{uri}"],
|
318
|
+
"names": [],
|
319
|
+
"file": "css_uri"
|
320
|
+
}
|
321
|
+
JSON
|
312
322
|
end
|
313
323
|
|
314
324
|
def test_source_map_with_css_uri_and_sourcemap_path_supports_filesystem_importer
|
@@ -395,8 +405,17 @@ MESSAGE
|
|
395
405
|
File.join(fixture_dir, path)
|
396
406
|
end
|
397
407
|
|
408
|
+
def test_filesystem_importer_eql
|
409
|
+
importer = Sass::Importers::Filesystem.new('.')
|
410
|
+
assert importer.eql?(Sass::Importers::Filesystem.new('.'))
|
411
|
+
assert importer.eql?(ReversedExtImporter.new('.'))
|
412
|
+
assert !importer.eql?(Sass::Importers::Filesystem.new('foo'))
|
413
|
+
assert !importer.eql?(nil)
|
414
|
+
assert !importer.eql?('foo')
|
415
|
+
end
|
416
|
+
|
398
417
|
def test_absolute_files_across_template_locations
|
399
418
|
importer = Sass::Importers::Filesystem.new(absolutize 'templates')
|
400
|
-
|
419
|
+
refute_nil importer.mtime(absolutize('more_templates/more1.sass'), {})
|
401
420
|
end
|
402
421
|
end
|
data/test/sass/logger_test.rb
CHANGED
@@ -24,6 +24,6 @@ body { font: Arial; background: blue; }
|
|
24
24
|
#content.user.show #container.top #column.right { width: 600px; }
|
25
25
|
#content.user.show #container.bottom { background: brown; }
|
26
26
|
|
27
|
-
#foo { background-color: #
|
27
|
+
#foo { background-color: #baf; }
|
28
28
|
|
29
29
|
nonimported { myconst: hello; otherconst: goodbye; post-mixin: here; }
|
@@ -1,23 +1,23 @@
|
|
1
1
|
|
2
2
|
|
3
3
|
body
|
4
|
-
:
|
5
|
-
:
|
4
|
+
font: Arial
|
5
|
+
background: blue
|
6
6
|
|
7
7
|
#page
|
8
|
-
:
|
9
|
-
:
|
8
|
+
width: 700px
|
9
|
+
height: 100
|
10
10
|
#header
|
11
|
-
:
|
11
|
+
height: 300px
|
12
12
|
h1
|
13
|
-
|
14
|
-
:
|
13
|
+
font-size: 50px
|
14
|
+
color: blue
|
15
15
|
|
16
16
|
#content.user.show
|
17
17
|
#container.top
|
18
18
|
#column.left
|
19
|
-
:
|
19
|
+
width: 100px
|
20
20
|
#column.right
|
21
|
-
:
|
21
|
+
width: 600px
|
22
22
|
#container.bottom
|
23
|
-
:
|
23
|
+
background: brown
|
data/test/sass/plugin_test.rb
CHANGED
@@ -17,7 +17,7 @@ module Sass::Script::Functions
|
|
17
17
|
end
|
18
18
|
end
|
19
19
|
|
20
|
-
class SassPluginTest < Test
|
20
|
+
class SassPluginTest < MiniTest::Test
|
21
21
|
@@templates = %w{
|
22
22
|
complex script parent_ref import scss_import alt
|
23
23
|
subdir/subdir subdir/nested_subdir/nested_subdir
|
@@ -29,8 +29,8 @@ class SassPluginTest < Test::Unit::TestCase
|
|
29
29
|
@@cache_store = Sass::CacheStores::Memory.new
|
30
30
|
|
31
31
|
def setup
|
32
|
-
FileUtils.mkdir_p tempfile_loc
|
33
|
-
FileUtils.mkdir_p tempfile_loc(nil,"more_")
|
32
|
+
Sass::Util.retry_on_windows {FileUtils.mkdir_p tempfile_loc}
|
33
|
+
Sass::Util.retry_on_windows {FileUtils.mkdir_p tempfile_loc(nil,"more_")}
|
34
34
|
set_plugin_opts
|
35
35
|
check_for_updates!
|
36
36
|
reset_mtimes
|
@@ -39,13 +39,13 @@ class SassPluginTest < Test::Unit::TestCase
|
|
39
39
|
def teardown
|
40
40
|
clean_up_sassc
|
41
41
|
Sass::Plugin.reset!
|
42
|
-
FileUtils.rm_r tempfile_loc
|
43
|
-
FileUtils.rm_r tempfile_loc(nil,"more_")
|
42
|
+
Sass::Util.retry_on_windows {FileUtils.rm_r tempfile_loc}
|
43
|
+
Sass::Util.retry_on_windows {FileUtils.rm_r tempfile_loc(nil,"more_")}
|
44
44
|
end
|
45
45
|
|
46
46
|
@@templates.each do |name|
|
47
47
|
define_method("test_template_renders_correctly (#{name})") do
|
48
|
-
assert_renders_correctly(name)
|
48
|
+
silence_warnings {assert_renders_correctly(name)}
|
49
49
|
end
|
50
50
|
end
|
51
51
|
|
@@ -113,11 +113,11 @@ class SassPluginTest < Test::Unit::TestCase
|
|
113
113
|
File.open(tempfile_loc('bork1')) do |file|
|
114
114
|
assert_equal(<<CSS.strip, file.read.split("\n")[0...6].join("\n"))
|
115
115
|
/*
|
116
|
-
|
116
|
+
Error: Undefined variable: "$bork".
|
117
117
|
on line 2 of #{template_loc('bork1')}
|
118
118
|
|
119
119
|
1: bork
|
120
|
-
2: :
|
120
|
+
2: bork: $bork
|
121
121
|
CSS
|
122
122
|
end
|
123
123
|
File.delete(tempfile_loc('bork1'))
|
@@ -129,12 +129,12 @@ CSS
|
|
129
129
|
File.open(tempfile_loc('bork5')) do |file|
|
130
130
|
assert_equal(<<CSS.strip, file.read.split("\n")[0...7].join("\n"))
|
131
131
|
/*
|
132
|
-
|
132
|
+
Error: Undefined variable: "$bork".
|
133
133
|
on line 3 of #{template_loc('bork5')}
|
134
134
|
|
135
135
|
1: bork
|
136
136
|
2: /* foo *\\/
|
137
|
-
3: :
|
137
|
+
3: bork: $bork
|
138
138
|
CSS
|
139
139
|
end
|
140
140
|
File.delete(tempfile_loc('bork1'))
|
@@ -146,7 +146,7 @@ CSS
|
|
146
146
|
File.open(tempfile_loc('single_import_loop')) do |file|
|
147
147
|
assert_equal(<<CSS.strip, file.read.split("\n")[0...2].join("\n"))
|
148
148
|
/*
|
149
|
-
|
149
|
+
Error: An @import loop has been found: #{template_loc('single_import_loop')} imports itself
|
150
150
|
CSS
|
151
151
|
end
|
152
152
|
end
|
@@ -157,9 +157,9 @@ CSS
|
|
157
157
|
File.open(tempfile_loc('double_import_loop1')) do |file|
|
158
158
|
assert_equal(<<CSS.strip, file.read.split("\n")[0...4].join("\n"))
|
159
159
|
/*
|
160
|
-
|
161
|
-
|
162
|
-
|
160
|
+
Error: An @import loop has been found:
|
161
|
+
#{template_loc('double_import_loop1')} imports #{template_loc('_double_import_loop2')}
|
162
|
+
#{template_loc('_double_import_loop2')} imports #{template_loc('double_import_loop1')}
|
163
163
|
CSS
|
164
164
|
end
|
165
165
|
end
|
@@ -170,8 +170,8 @@ CSS
|
|
170
170
|
File.open(tempfile_loc('subdir/import_up1')) do |file|
|
171
171
|
assert_equal(<<CSS.strip, file.read.split("\n")[0...5].join("\n"))
|
172
172
|
/*
|
173
|
-
|
174
|
-
|
173
|
+
Error: File to import not found or unreadable: ../subdir/import_up3.scss.
|
174
|
+
Load path: #{template_loc}
|
175
175
|
on line 1 of #{template_loc 'subdir/import_up2'}
|
176
176
|
from line 1 of #{template_loc 'subdir/import_up1'}
|
177
177
|
CSS
|
@@ -183,7 +183,7 @@ CSS
|
|
183
183
|
Sass::Plugin.options[:full_exception] = false
|
184
184
|
|
185
185
|
File.delete(tempfile_loc('bork1'))
|
186
|
-
|
186
|
+
assert_raises(Sass::SyntaxError) {check_for_updates!}
|
187
187
|
ensure
|
188
188
|
Sass::Plugin.options[:full_exception] = old_full_exception
|
189
189
|
end
|
@@ -209,7 +209,7 @@ CSS
|
|
209
209
|
end
|
210
210
|
|
211
211
|
def test_doesnt_render_partials
|
212
|
-
assert !File.
|
212
|
+
assert !File.exist?(tempfile_loc('_partial'))
|
213
213
|
end
|
214
214
|
|
215
215
|
def test_template_location_array
|
@@ -501,13 +501,15 @@ WARNING
|
|
501
501
|
Sass::Plugin::StalenessChecker.dependencies_cache = {}
|
502
502
|
atime = Time.now
|
503
503
|
mtime = Time.now - 5
|
504
|
-
Dir["{#{template_loc},#{tempfile_loc}}/**/*.{css,sass,scss}"].each
|
504
|
+
Dir["{#{template_loc},#{tempfile_loc}}/**/*.{css,sass,scss}"].each do |f|
|
505
|
+
Sass::Util.retry_on_windows {File.utime(atime, mtime, f)}
|
506
|
+
end
|
505
507
|
end
|
506
508
|
|
507
509
|
def template_loc(name = nil, prefix = nil)
|
508
510
|
if name
|
509
511
|
scss = absolutize "#{prefix}templates/#{name}.scss"
|
510
|
-
File.
|
512
|
+
File.exist?(scss) ? scss : absolutize("#{prefix}templates/#{name}.sass")
|
511
513
|
else
|
512
514
|
absolutize "#{prefix}templates"
|
513
515
|
end
|
@@ -537,7 +539,8 @@ WARNING
|
|
537
539
|
:always_update => true,
|
538
540
|
:never_update => false,
|
539
541
|
:full_exception => true,
|
540
|
-
:cache_store => @@cache_store
|
542
|
+
:cache_store => @@cache_store,
|
543
|
+
:sourcemap => :none
|
541
544
|
)
|
542
545
|
Sass::Plugin.options.merge!(overrides)
|
543
546
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
body { margin: 0; font: 0.85em "Lucida Grande", "Trebuchet MS", Verdana, sans-serif; color:
|
1
|
+
body { margin: 0; font: 0.85em "Lucida Grande", "Trebuchet MS", Verdana, sans-serif; color: #fff; background: url(/images/global_bg.gif); }
|
2
2
|
|
3
3
|
#page { width: 900px; margin: 0 auto; background: #440008; border-top-width: 5px; border-top-style: solid; border-top-color: #ff8500; }
|
4
4
|
|
@@ -16,8 +16,8 @@ body { margin: 0; font: 0.85em "Lucida Grande", "Trebuchet MS", Verdana, sans-se
|
|
16
16
|
|
17
17
|
#menu { clear: both; text-align: right; height: 20px; border-bottom: 5px solid #006b95; background: #00a4e4; }
|
18
18
|
#menu .contests ul { margin: 0 5px 0 0; padding: 0; }
|
19
|
-
#menu .contests ul li { list-style-type: none; margin: 0 5px; padding: 5px 5px 0 5px; display: inline; font-size: 1.1em; color:
|
20
|
-
#menu .contests a:link, #menu .contests a:visited { color:
|
19
|
+
#menu .contests ul li { list-style-type: none; margin: 0 5px; padding: 5px 5px 0 5px; display: inline; font-size: 1.1em; color: #fff; background: #00a4e4; }
|
20
|
+
#menu .contests a:link, #menu .contests a:visited { color: #fff; text-decoration: none; font-weight: bold; }
|
21
21
|
#menu .contests a:hover { text-decoration: underline; }
|
22
22
|
|
23
23
|
#content { clear: both; }
|
@@ -81,6 +81,6 @@ body { margin: 0; font: 0.85em "Lucida Grande", "Trebuchet MS", Verdana, sans-se
|
|
81
81
|
|
82
82
|
img { border: none; }
|
83
83
|
|
84
|
-
button.short { width: 60px; height: 22px; padding: 0 0 2px 0; color:
|
84
|
+
button.short { width: 60px; height: 22px; padding: 0 0 2px 0; color: #fff; border: none; background: url(/images/btn_short.gif) no-repeat; }
|
85
85
|
|
86
86
|
table { border-collapse: collapse; }
|
@@ -26,6 +26,6 @@ body { font: Arial; background: blue; }
|
|
26
26
|
#content.user.show #container.top #column.right { width: 600px; }
|
27
27
|
#content.user.show #container.bottom { background: brown; }
|
28
28
|
|
29
|
-
#foo { background-color: #
|
29
|
+
#foo { background-color: #baf; }
|
30
30
|
|
31
31
|
nonimported { myconst: hello; otherconst: goodbye; post-mixin: here; }
|
@@ -1,12 +1,12 @@
|
|
1
1
|
#main {
|
2
2
|
width: 15em;
|
3
|
-
color:
|
3
|
+
color: #0000ff;
|
4
4
|
}
|
5
5
|
#main p {
|
6
6
|
border-top-width: 2px;
|
7
|
-
border-top-color: #
|
7
|
+
border-top-color: #fc0;
|
8
8
|
border-left-width: 1px;
|
9
|
-
border-left-color:
|
9
|
+
border-left-color: #000;
|
10
10
|
-moz-border-radius: 10px;
|
11
11
|
border-style: dotted;
|
12
12
|
border-width: 2px;
|
@@ -17,9 +17,9 @@
|
|
17
17
|
|
18
18
|
#left {
|
19
19
|
border-top-width: 2px;
|
20
|
-
border-top-color: #
|
20
|
+
border-top-color: #fc0;
|
21
21
|
border-left-width: 1px;
|
22
|
-
border-left-color:
|
22
|
+
border-left-color: #000;
|
23
23
|
-moz-border-radius: 10px;
|
24
24
|
font-size: 2em;
|
25
25
|
font-weight: bold;
|
@@ -28,25 +28,25 @@
|
|
28
28
|
|
29
29
|
#right {
|
30
30
|
border-top-width: 2px;
|
31
|
-
border-top-color: #
|
31
|
+
border-top-color: #fc0;
|
32
32
|
border-left-width: 1px;
|
33
|
-
border-left-color:
|
33
|
+
border-left-color: #000;
|
34
34
|
-moz-border-radius: 10px;
|
35
|
-
color:
|
35
|
+
color: #f00;
|
36
36
|
font-size: 20px;
|
37
37
|
float: right;
|
38
38
|
}
|
39
39
|
|
40
40
|
.bordered {
|
41
41
|
border-top-width: 2px;
|
42
|
-
border-top-color: #
|
42
|
+
border-top-color: #fc0;
|
43
43
|
border-left-width: 1px;
|
44
|
-
border-left-color:
|
44
|
+
border-left-color: #000;
|
45
45
|
-moz-border-radius: 10px;
|
46
46
|
}
|
47
47
|
|
48
48
|
.complex {
|
49
|
-
color:
|
49
|
+
color: #f00;
|
50
50
|
font-size: 20px;
|
51
51
|
text-decoration: none;
|
52
52
|
}
|
@@ -59,12 +59,12 @@
|
|
59
59
|
}
|
60
60
|
* html .complex {
|
61
61
|
height: 1px;
|
62
|
-
color:
|
62
|
+
color: #f00;
|
63
63
|
font-size: 20px;
|
64
64
|
}
|
65
65
|
|
66
66
|
.more-complex {
|
67
|
-
color:
|
67
|
+
color: #f00;
|
68
68
|
font-size: 20px;
|
69
69
|
text-decoration: none;
|
70
70
|
display: inline;
|
@@ -80,16 +80,16 @@
|
|
80
80
|
}
|
81
81
|
* html .more-complex {
|
82
82
|
height: 1px;
|
83
|
-
color:
|
83
|
+
color: #f00;
|
84
84
|
font-size: 20px;
|
85
85
|
}
|
86
86
|
.more-complex a:hover {
|
87
87
|
text-decoration: underline;
|
88
|
-
color:
|
88
|
+
color: #f00;
|
89
89
|
font-size: 20px;
|
90
90
|
border-top-width: 2px;
|
91
|
-
border-top-color: #
|
91
|
+
border-top-color: #fc0;
|
92
92
|
border-left-width: 1px;
|
93
|
-
border-left-color:
|
93
|
+
border-left-color: #000;
|
94
94
|
-moz-border-radius: 10px;
|
95
95
|
}
|
@@ -1,13 +1,13 @@
|
|
1
|
-
#main { content: Hello\!; qstr: 'Quo"ted"!'; hstr: Hyph-en\!; width: 30em; background-color:
|
2
|
-
#main #sidebar { background-color: #00ff98; num-normal: 10; num-dec: 10.2; num-dec0: 99; num-neg: -10; esc: 10
|
1
|
+
#main { content: Hello\!; qstr: 'Quo"ted"!'; hstr: Hyph-en\!; width: 30em; background-color: #000; color: #ffa; short-color: #123; named-color: olive; con: "foo" bar 9 hi there "boom"; con2: "noquo" quo; }
|
2
|
+
#main #sidebar { background-color: #00ff98; num-normal: 10; num-dec: 10.2; num-dec0: 99; num-neg: -10; esc: 10\+12; many: 6; order: 7; complex: #4c9db1hi16; }
|
3
3
|
|
4
|
-
#plus { num-num: 7; num-num-un: 25em; num-num-un2: 23em; num-num-neg: 9.87; num-str: 100px; num-col: #b7b7b7; num-perc: 31%; str-str: "hi
|
4
|
+
#plus { num-num: 7; num-num-un: 25em; num-num-un2: 23em; num-num-neg: 9.87; num-str: 100px; num-col: #b7b7b7; num-perc: 31%; str-str: "hi there"; str-str2: "hi there"; str-col: "14em solid #123"; str-num: "times: 13"; col-num: #ff7c9e; col-col: #5173ff; }
|
5
5
|
|
6
|
-
#minus { num-num: 900; col-num: #
|
6
|
+
#minus { num-num: 900; col-num: #fafaf5; col-col: #000035; unary-num: -1; unary-const: 10; unary-paren: -11; unary-two: 12; unary-many: 12; unary-crazy: -15; }
|
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
|
|
@@ -26,6 +26,6 @@ body { font: Arial; background: blue; }
|
|
26
26
|
#content.user.show #container.top #column.right { width: 600px; }
|
27
27
|
#content.user.show #container.bottom { background: brown; }
|
28
28
|
|
29
|
-
#foo { background-color: #
|
29
|
+
#foo { background-color: #baf; }
|
30
30
|
|
31
31
|
nonimported { myconst: hello; otherconst: goodbye; post-mixin: here; }
|