sass 3.2.11 → 3.2.12

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 CHANGED
@@ -1 +1 @@
1
- 3.2.11
1
+ 3.2.12
@@ -1 +1 @@
1
- 28 September 2013 01:15:19 UTC
1
+ 05 October 2013 01:29:11 UTC
@@ -1,3 +1,5 @@
1
+ require 'thread'
2
+
1
3
  module Sass
2
4
  module Plugin
3
5
  # The class handles `.s[ca]ss` file staleness checks via their mtime timestamps.
@@ -120,7 +120,7 @@ module Sass
120
120
 
121
121
  # @see AbstractSequence#specificity
122
122
  def specificity
123
- 0
123
+ SPECIFICITY_BASE
124
124
  end
125
125
  end
126
126
 
@@ -450,7 +450,7 @@ module Sass
450
450
  # separate sequences should limit the quadratic behavior.
451
451
  seqses.each_with_index do |seqs1, i|
452
452
  result[i] = seqs1.reject do |seq1|
453
- min_spec = _sources(seq1).map {|seq| seq.specificity}.min || 0
453
+ max_spec = _sources(seq1).map {|seq| seq.specificity}.max || 0
454
454
  result.any? do |seqs2|
455
455
  next if seqs1.equal?(seqs2)
456
456
  # Second Law of Extend: the specificity of a generated selector
@@ -458,7 +458,7 @@ module Sass
458
458
  # selector.
459
459
  #
460
460
  # See https://github.com/nex3/sass/issues/324.
461
- seqs2.any? {|seq2| _specificity(seq2) >= min_spec && _superselector?(seq2, seq1)}
461
+ seqs2.any? {|seq2| _specificity(seq2) >= max_spec && _superselector?(seq2, seq1)}
462
462
  end
463
463
  end
464
464
  end
@@ -3,6 +3,7 @@ require 'set'
3
3
  require 'enumerator'
4
4
  require 'stringio'
5
5
  require 'rbconfig'
6
+ require 'thread'
6
7
 
7
8
  require 'sass/root'
8
9
  require 'sass/util/subset_map'
@@ -1207,6 +1207,27 @@ SCSS
1207
1207
  end
1208
1208
  end
1209
1209
 
1210
+ def test_multiple_source_redundancy_elimination
1211
+ assert_equal <<CSS, render(<<SCSS)
1212
+ .test-case, .test-case:active {
1213
+ color: red; }
1214
+
1215
+ .test-case:hover {
1216
+ color: green; }
1217
+ CSS
1218
+ %default-color {color: red}
1219
+ %alt-color {color: green}
1220
+
1221
+ %default-style {
1222
+ @extend %default-color;
1223
+ &:hover {@extend %alt-color}
1224
+ &:active {@extend %default-color}
1225
+ }
1226
+
1227
+ .test-case {@extend %default-style}
1228
+ SCSS
1229
+ end
1230
+
1210
1231
  def test_nested_sibling_extend
1211
1232
  assert_equal <<CSS, render(<<SCSS)
1212
1233
  .parent .bar, .parent .foo {
@@ -1397,22 +1418,22 @@ SCSS
1397
1418
 
1398
1419
  def test_extend_cross_branch_redundancy_elimination
1399
1420
  assert_equal <<CSS, render(<<SCSS)
1400
- a c d, b c a d {
1421
+ .a .c .d, .b .c .a .d {
1401
1422
  a: b; }
1402
1423
  CSS
1403
- %x c %y {a: b}
1404
- a, b {@extend %x}
1405
- a d {@extend %y}
1424
+ %x .c %y {a: b}
1425
+ .a, .b {@extend %x}
1426
+ .a .d {@extend %y}
1406
1427
  SCSS
1407
1428
 
1408
1429
  assert_equal <<CSS, render(<<SCSS)
1409
- e a c d, a c e d, e b c a d, b c a e d {
1430
+ .e .a .c .d, .a .c .e .d, .e .b .c .a .d, .b .c .a .e .d {
1410
1431
  a: b; }
1411
1432
  CSS
1412
- e %z {a: b}
1413
- %x c %y {@extend %z}
1414
- a, b {@extend %x}
1415
- a d {@extend %y}
1433
+ .e %z {a: b}
1434
+ %x .c %y {@extend %z}
1435
+ .a, .b {@extend %x}
1436
+ .a .d {@extend %y}
1416
1437
  SCSS
1417
1438
  end
1418
1439
 
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.11
4
+ version: 3.2.12
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-09-28 00:00:00.000000000 Z
14
+ date: 2013-10-05 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: yard