sass 3.2.8 → 3.2.9
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.
- data/VERSION +1 -1
- data/VERSION_DATE +1 -1
- data/lib/sass/plugin/compiler.rb +38 -17
- data/lib/sass/script/functions.rb +13 -0
- data/lib/sass/selector/simple_sequence.rb +1 -1
- data/test/sass/extend_test.rb +14 -0
- data/test/sass/functions_test.rb +9 -1
- data/test/sass/script_test.rb +1 -0
- data/vendor/listen/CHANGELOG.md +7 -0
- data/vendor/listen/Gemfile +1 -1
- data/vendor/listen/lib/listen/adapters/darwin.rb +1 -1
- data/vendor/listen/lib/listen/adapters/linux.rb +1 -1
- data/vendor/listen/lib/listen/adapters/windows.rb +1 -1
- data/vendor/listen/lib/listen/version.rb +1 -1
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.2.
|
1
|
+
3.2.9
|
data/VERSION_DATE
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
10 May 2013 23:56:29 UTC
|
data/lib/sass/plugin/compiler.rb
CHANGED
@@ -234,23 +234,7 @@ module Sass::Plugin
|
|
234
234
|
def watch(individual_files = [])
|
235
235
|
update_stylesheets(individual_files)
|
236
236
|
|
237
|
-
|
238
|
-
require 'listen'
|
239
|
-
rescue LoadError => e
|
240
|
-
dir = Sass::Util.scope("vendor/listen/lib")
|
241
|
-
if $LOAD_PATH.include?(dir)
|
242
|
-
e.message << "\n" <<
|
243
|
-
if File.exists?(scope(".git"))
|
244
|
-
'Run "git submodule update --init" to get the recommended version.'
|
245
|
-
else
|
246
|
-
'Run "gem install listen" to get it.'
|
247
|
-
end
|
248
|
-
raise e
|
249
|
-
else
|
250
|
-
$LOAD_PATH.unshift dir
|
251
|
-
retry
|
252
|
-
end
|
253
|
-
end
|
237
|
+
load_listen!
|
254
238
|
|
255
239
|
template_paths = template_locations # cache the locations
|
256
240
|
individual_files_hash = individual_files.inject({}) do |h, files|
|
@@ -328,6 +312,43 @@ module Sass::Plugin
|
|
328
312
|
|
329
313
|
private
|
330
314
|
|
315
|
+
def load_listen!
|
316
|
+
if defined?(gem)
|
317
|
+
begin
|
318
|
+
gem 'listen', '~> 0.7'
|
319
|
+
require 'listen'
|
320
|
+
rescue Gem::LoadError
|
321
|
+
dir = Sass::Util.scope("vendor/listen/lib")
|
322
|
+
$LOAD_PATH.unshift dir
|
323
|
+
begin
|
324
|
+
require 'listen'
|
325
|
+
rescue LoadError => e
|
326
|
+
e.message << "\n" <<
|
327
|
+
if File.exists?(scope(".git"))
|
328
|
+
'Run "git submodule update --init" to get the recommended version.'
|
329
|
+
else
|
330
|
+
'Run "gem install listen" to get it.'
|
331
|
+
end
|
332
|
+
raise e
|
333
|
+
end
|
334
|
+
end
|
335
|
+
else
|
336
|
+
begin
|
337
|
+
require 'listen'
|
338
|
+
rescue LoadError => e
|
339
|
+
dir = Sass::Util.scope("vendor/listen/lib")
|
340
|
+
if $LOAD_PATH.include?(dir)
|
341
|
+
raise e unless File.exists?(scope(".git"))
|
342
|
+
e.message << "\n" <<
|
343
|
+
'Run "git submodule update --init" to get the recommended version.'
|
344
|
+
else
|
345
|
+
$LOAD_PATH.unshift dir
|
346
|
+
retry
|
347
|
+
end
|
348
|
+
end
|
349
|
+
end
|
350
|
+
end
|
351
|
+
|
331
352
|
def update_stylesheet(filename, css)
|
332
353
|
dir = File.dirname(css)
|
333
354
|
unless File.exists?(dir)
|
@@ -1423,6 +1423,19 @@ module Sass::Script
|
|
1423
1423
|
end
|
1424
1424
|
declare :if, [:condition, :if_true, :if_false]
|
1425
1425
|
|
1426
|
+
# This function only exists as a workaround for IE7's [`content:counter`
|
1427
|
+
# bug][bug]. It works identically to any other plain-CSS function, except it
|
1428
|
+
# avoids adding spaces between the argument commas.
|
1429
|
+
#
|
1430
|
+
# [bug]: http://jes.st/2013/ie7s-css-breaking-content-counter-bug/
|
1431
|
+
#
|
1432
|
+
# @example
|
1433
|
+
# counter(item, ".") => counter(item,".")
|
1434
|
+
def counter(*args)
|
1435
|
+
Sass::Script::String.new("counter(#{args.map {|a| a.to_s(options)}.join(',')})")
|
1436
|
+
end
|
1437
|
+
declare :counter, [], :var_args => true
|
1438
|
+
|
1426
1439
|
private
|
1427
1440
|
|
1428
1441
|
# This method implements the pattern of transforming a numeric value into
|
data/test/sass/extend_test.rb
CHANGED
@@ -1186,6 +1186,20 @@ SCSS
|
|
1186
1186
|
|
1187
1187
|
# Regression Tests
|
1188
1188
|
|
1189
|
+
def test_nested_extend_specificity
|
1190
|
+
assert_equal <<CSS, render(<<SCSS)
|
1191
|
+
a :b, a :b:c {
|
1192
|
+
a: b; }
|
1193
|
+
CSS
|
1194
|
+
%foo {a: b}
|
1195
|
+
|
1196
|
+
a {
|
1197
|
+
:b {@extend %foo}
|
1198
|
+
:b:c {@extend %foo}
|
1199
|
+
}
|
1200
|
+
SCSS
|
1201
|
+
end
|
1202
|
+
|
1189
1203
|
def test_nested_double_extend_optimization
|
1190
1204
|
assert_equal <<CSS, render(<<SCSS)
|
1191
1205
|
.parent1 .child {
|
data/test/sass/functions_test.rb
CHANGED
@@ -1037,6 +1037,12 @@ MSG
|
|
1037
1037
|
assert_equal("2px", evaluate("if(null, 1px, 2px)"))
|
1038
1038
|
end
|
1039
1039
|
|
1040
|
+
def test_counter
|
1041
|
+
assert_equal("counter(foo)", evaluate("counter(foo)"))
|
1042
|
+
assert_equal('counter(item,".")', evaluate('counter(item, ".")'))
|
1043
|
+
assert_equal('counter(item,".")', evaluate('counter(item,".")'))
|
1044
|
+
end
|
1045
|
+
|
1040
1046
|
def test_keyword_args_rgb
|
1041
1047
|
assert_equal(%Q{white}, evaluate("rgb($red: 255, $green: 255, $blue: 255)"))
|
1042
1048
|
end
|
@@ -1105,7 +1111,9 @@ MSG
|
|
1105
1111
|
private
|
1106
1112
|
|
1107
1113
|
def evaluate(value)
|
1108
|
-
|
1114
|
+
result = perform(value)
|
1115
|
+
assert_kind_of Sass::Script::Literal, result
|
1116
|
+
return result.to_s
|
1109
1117
|
end
|
1110
1118
|
|
1111
1119
|
def perform(value)
|
data/test/sass/script_test.rb
CHANGED
data/vendor/listen/CHANGELOG.md
CHANGED
data/vendor/listen/Gemfile
CHANGED
@@ -8,7 +8,7 @@ gem 'rake'
|
|
8
8
|
|
9
9
|
gem 'rb-kqueue', '~> 0.2' if RbConfig::CONFIG['target_os'] =~ /freebsd/i
|
10
10
|
gem 'rb-fsevent', '~> 0.9.1' if RbConfig::CONFIG['target_os'] =~ /darwin(1.+)?$/i
|
11
|
-
gem 'rb-inotify', '~> 0.
|
11
|
+
gem 'rb-inotify', '~> 0.9.0' if RbConfig::CONFIG['target_os'] =~ /linux/i
|
12
12
|
gem 'wdm', '~> 0.0.3' if RbConfig::CONFIG['target_os'] =~ /mswin|mingw/i
|
13
13
|
|
14
14
|
group :development do
|
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.2.
|
4
|
+
version: 3.2.9
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2013-
|
14
|
+
date: 2013-05-10 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: yard
|