sass 3.1.21 → 3.2.0.alpha.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (180) hide show
  1. data/README.md +5 -4
  2. data/REVISION +1 -1
  3. data/Rakefile +6 -15
  4. data/VERSION +1 -1
  5. data/VERSION_NAME +1 -1
  6. data/lib/sass.rb +0 -1
  7. data/lib/sass/cache_stores/base.rb +1 -3
  8. data/lib/sass/cache_stores/filesystem.rb +0 -3
  9. data/lib/sass/css.rb +49 -145
  10. data/lib/sass/engine.rb +23 -47
  11. data/lib/sass/environment.rb +5 -30
  12. data/lib/sass/exec.rb +7 -30
  13. data/lib/sass/importers/base.rb +1 -2
  14. data/lib/sass/importers/filesystem.rb +13 -18
  15. data/lib/sass/less.rb +1 -1
  16. data/lib/sass/plugin.rb +8 -4
  17. data/lib/sass/plugin/compiler.rb +67 -93
  18. data/lib/sass/plugin/configuration.rb +2 -0
  19. data/lib/sass/plugin/staleness_checker.rb +4 -14
  20. data/lib/sass/repl.rb +3 -2
  21. data/lib/sass/script.rb +1 -0
  22. data/lib/sass/script/color.rb +9 -4
  23. data/lib/sass/script/funcall.rb +3 -16
  24. data/lib/sass/script/functions.rb +55 -98
  25. data/lib/sass/script/interpolation.rb +0 -9
  26. data/lib/sass/script/lexer.rb +4 -2
  27. data/lib/sass/script/list.rb +0 -8
  28. data/lib/sass/script/literal.rb +20 -5
  29. data/lib/sass/script/node.rb +0 -8
  30. data/lib/sass/script/number.rb +11 -35
  31. data/lib/sass/script/operation.rb +0 -16
  32. data/lib/sass/script/parser.rb +5 -12
  33. data/lib/sass/script/string_interpolation.rb +0 -9
  34. data/lib/sass/script/unary_operation.rb +0 -7
  35. data/lib/sass/script/variable.rb +1 -5
  36. data/lib/sass/scss/parser.rb +54 -191
  37. data/lib/sass/scss/rx.rb +3 -15
  38. data/lib/sass/scss/static_parser.rb +3 -3
  39. data/lib/sass/selector.rb +3 -15
  40. data/lib/sass/selector/abstract_sequence.rb +2 -11
  41. data/lib/sass/selector/comma_sequence.rb +3 -8
  42. data/lib/sass/selector/sequence.rb +11 -74
  43. data/lib/sass/selector/simple.rb +1 -7
  44. data/lib/sass/selector/simple_sequence.rb +8 -28
  45. data/lib/sass/shared.rb +5 -3
  46. data/lib/sass/tree/comment_node.rb +12 -25
  47. data/lib/sass/tree/debug_node.rb +1 -1
  48. data/lib/sass/tree/directive_node.rb +0 -5
  49. data/lib/sass/tree/each_node.rb +1 -1
  50. data/lib/sass/tree/extend_node.rb +1 -1
  51. data/lib/sass/tree/for_node.rb +2 -2
  52. data/lib/sass/tree/function_node.rb +1 -1
  53. data/lib/sass/tree/if_node.rb +14 -1
  54. data/lib/sass/tree/media_node.rb +4 -4
  55. data/lib/sass/tree/mixin_def_node.rb +1 -1
  56. data/lib/sass/tree/mixin_node.rb +2 -2
  57. data/lib/sass/tree/node.rb +26 -10
  58. data/lib/sass/tree/return_node.rb +1 -1
  59. data/lib/sass/tree/root_node.rb +1 -1
  60. data/lib/sass/tree/rule_node.rb +11 -9
  61. data/lib/sass/tree/variable_node.rb +1 -1
  62. data/lib/sass/tree/visitors/base.rb +1 -1
  63. data/lib/sass/tree/visitors/check_nesting.rb +36 -29
  64. data/lib/sass/tree/visitors/convert.rb +9 -16
  65. data/lib/sass/tree/visitors/cssize.rb +9 -40
  66. data/lib/sass/tree/visitors/perform.rb +23 -79
  67. data/lib/sass/tree/visitors/to_css.rb +21 -23
  68. data/lib/sass/tree/warn_node.rb +1 -1
  69. data/lib/sass/tree/while_node.rb +1 -1
  70. data/lib/sass/util.rb +9 -147
  71. data/lib/sass/version.rb +0 -14
  72. data/test/sass/cache_test.rb +0 -15
  73. data/test/sass/conversion_test.rb +8 -50
  74. data/test/sass/css2sass_test.rb +0 -33
  75. data/test/sass/engine_test.rb +32 -283
  76. data/test/sass/extend_test.rb +0 -315
  77. data/test/sass/functions_test.rb +23 -60
  78. data/test/sass/importer_test.rb +0 -110
  79. data/test/sass/more_results/more_import.css +2 -2
  80. data/test/sass/plugin_test.rb +13 -40
  81. data/test/sass/results/import.css +2 -2
  82. data/test/sass/results/import_charset.css +0 -1
  83. data/test/sass/results/import_charset_1_8.css +0 -1
  84. data/test/sass/results/import_charset_ibm866.css +0 -1
  85. data/test/sass/results/scss_import.css +2 -2
  86. data/test/sass/results/units.css +1 -1
  87. data/test/sass/script_conversion_test.rb +0 -2
  88. data/test/sass/script_test.rb +4 -28
  89. data/test/sass/scss/css_test.rb +1 -79
  90. data/test/sass/scss/scss_test.rb +16 -96
  91. data/test/sass/templates/import_charset.sass +0 -2
  92. data/test/sass/templates/import_charset_1_8.sass +0 -2
  93. data/test/sass/templates/import_charset_ibm866.sass +0 -2
  94. data/test/sass/test_helper.rb +1 -1
  95. data/test/sass/util_test.rb +0 -28
  96. data/test/test_helper.rb +0 -2
  97. data/vendor/{listen → fssm}/LICENSE +1 -1
  98. data/vendor/fssm/README.markdown +55 -0
  99. data/vendor/fssm/Rakefile +59 -0
  100. data/vendor/fssm/VERSION.yml +5 -0
  101. data/vendor/fssm/example.rb +9 -0
  102. data/vendor/fssm/fssm.gemspec +77 -0
  103. data/vendor/fssm/lib/fssm.rb +33 -0
  104. data/vendor/fssm/lib/fssm/backends/fsevents.rb +36 -0
  105. data/vendor/fssm/lib/fssm/backends/inotify.rb +26 -0
  106. data/vendor/fssm/lib/fssm/backends/polling.rb +25 -0
  107. data/vendor/fssm/lib/fssm/backends/rubycocoa/fsevents.rb +131 -0
  108. data/vendor/fssm/lib/fssm/monitor.rb +26 -0
  109. data/vendor/fssm/lib/fssm/path.rb +91 -0
  110. data/vendor/fssm/lib/fssm/pathname.rb +502 -0
  111. data/vendor/fssm/lib/fssm/state/directory.rb +57 -0
  112. data/vendor/fssm/lib/fssm/state/file.rb +24 -0
  113. data/vendor/fssm/lib/fssm/support.rb +63 -0
  114. data/vendor/fssm/lib/fssm/tree.rb +176 -0
  115. data/vendor/fssm/profile/prof-cache.rb +40 -0
  116. data/vendor/fssm/profile/prof-fssm-pathname.html +1231 -0
  117. data/vendor/fssm/profile/prof-pathname.rb +68 -0
  118. data/vendor/fssm/profile/prof-plain-pathname.html +988 -0
  119. data/vendor/fssm/profile/prof.html +2379 -0
  120. data/vendor/fssm/spec/path_spec.rb +75 -0
  121. data/vendor/fssm/spec/root/duck/quack.txt +0 -0
  122. data/vendor/fssm/spec/root/file.css +0 -0
  123. data/vendor/fssm/spec/root/file.rb +0 -0
  124. data/vendor/fssm/spec/root/file.yml +0 -0
  125. data/vendor/fssm/spec/root/moo/cow.txt +0 -0
  126. data/vendor/fssm/spec/spec_helper.rb +14 -0
  127. metadata +246 -281
  128. data/VERSION_DATE +0 -1
  129. data/lib/sass/logger.rb +0 -15
  130. data/lib/sass/logger/base.rb +0 -32
  131. data/lib/sass/logger/log_level.rb +0 -49
  132. data/lib/sass/tree/visitors/deep_copy.rb +0 -87
  133. data/lib/sass/tree/visitors/extend.rb +0 -42
  134. data/lib/sass/tree/visitors/set_options.rb +0 -97
  135. data/lib/sass/util/multibyte_string_scanner.rb +0 -134
  136. data/test/Gemfile +0 -4
  137. data/test/Gemfile.lock +0 -19
  138. data/test/sass/fixtures/test_staleness_check_across_importers.css +0 -1
  139. data/test/sass/fixtures/test_staleness_check_across_importers.scss +0 -1
  140. data/test/sass/logger_test.rb +0 -58
  141. data/test/sass/templates/_double_import_loop2.sass +0 -1
  142. data/test/sass/templates/bork5.sass +0 -3
  143. data/test/sass/templates/double_import_loop1.sass +0 -1
  144. data/test/sass/templates/nested_bork5.sass +0 -2
  145. data/test/sass/templates/single_import_loop.sass +0 -1
  146. data/test/sass/util/multibyte_string_scanner_test.rb +0 -147
  147. data/vendor/listen/CHANGELOG.md +0 -147
  148. data/vendor/listen/Gemfile +0 -23
  149. data/vendor/listen/Guardfile +0 -8
  150. data/vendor/listen/README.md +0 -312
  151. data/vendor/listen/Rakefile +0 -47
  152. data/vendor/listen/Vagrantfile +0 -96
  153. data/vendor/listen/lib/listen.rb +0 -38
  154. data/vendor/listen/lib/listen/adapter.rb +0 -167
  155. data/vendor/listen/lib/listen/adapters/darwin.rb +0 -84
  156. data/vendor/listen/lib/listen/adapters/linux.rb +0 -110
  157. data/vendor/listen/lib/listen/adapters/polling.rb +0 -66
  158. data/vendor/listen/lib/listen/adapters/windows.rb +0 -81
  159. data/vendor/listen/lib/listen/directory_record.rb +0 -318
  160. data/vendor/listen/lib/listen/listener.rb +0 -203
  161. data/vendor/listen/lib/listen/multi_listener.rb +0 -121
  162. data/vendor/listen/lib/listen/turnstile.rb +0 -28
  163. data/vendor/listen/lib/listen/version.rb +0 -3
  164. data/vendor/listen/listen.gemspec +0 -26
  165. data/vendor/listen/spec/listen/adapter_spec.rb +0 -142
  166. data/vendor/listen/spec/listen/adapters/darwin_spec.rb +0 -31
  167. data/vendor/listen/spec/listen/adapters/linux_spec.rb +0 -41
  168. data/vendor/listen/spec/listen/adapters/polling_spec.rb +0 -68
  169. data/vendor/listen/spec/listen/adapters/windows_spec.rb +0 -24
  170. data/vendor/listen/spec/listen/directory_record_spec.rb +0 -1138
  171. data/vendor/listen/spec/listen/listener_spec.rb +0 -155
  172. data/vendor/listen/spec/listen/multi_listener_spec.rb +0 -156
  173. data/vendor/listen/spec/listen/turnstile_spec.rb +0 -56
  174. data/vendor/listen/spec/listen_spec.rb +0 -73
  175. data/vendor/listen/spec/spec_helper.rb +0 -18
  176. data/vendor/listen/spec/support/adapter_helper.rb +0 -716
  177. data/vendor/listen/spec/support/directory_record_helper.rb +0 -55
  178. data/vendor/listen/spec/support/fixtures_helper.rb +0 -29
  179. data/vendor/listen/spec/support/listeners_helper.rb +0 -144
  180. data/vendor/listen/spec/support/platform_helper.rb +0 -11
@@ -741,22 +741,6 @@ SCSS
741
741
  CSS
742
742
  :foo.baz {a: b}
743
743
  :bar {@extend .baz}
744
- SCSS
745
-
746
- assert_equal <<CSS, render(<<SCSS)
747
- .baz:foo, :foo:after {
748
- a: b; }
749
- CSS
750
- .baz:foo {a: b}
751
- :after {@extend .baz}
752
- SCSS
753
-
754
- assert_equal <<CSS, render(<<SCSS)
755
- .baz:after, :foo:after {
756
- a: b; }
757
- CSS
758
- .baz:after {a: b}
759
- :foo {@extend .baz}
760
744
  SCSS
761
745
 
762
746
  assert_equal <<CSS, render(<<SCSS)
@@ -876,20 +860,6 @@ CSS
876
860
  SCSS
877
861
  end
878
862
 
879
- def test_comma_extendee
880
- assert_equal <<CSS, render(<<SCSS)
881
- .foo, .baz {
882
- a: b; }
883
-
884
- .bar, .baz {
885
- c: d; }
886
- CSS
887
- .foo {a: b}
888
- .bar {c: d}
889
- .baz {@extend .foo, .bar}
890
- SCSS
891
- end
892
-
893
863
  ## Long Extendees
894
864
 
895
865
  def test_long_extendee
@@ -1369,291 +1339,6 @@ CSS
1369
1339
  SCSS
1370
1340
  end
1371
1341
 
1372
- def test_extend_out_of_media
1373
- assert_warning(<<WARN) {assert_equal(<<CSS, render(<<SCSS))}
1374
- DEPRECATION WARNING on line 3 of test_extend_out_of_media_inline.sass:
1375
- @extending an outer selector from within @media is deprecated.
1376
- You may only @extend selectors within the same directive.
1377
- This will be an error in Sass 3.3.
1378
- It can only work once @extend is supported natively in the browser.
1379
- WARN
1380
- .foo {
1381
- a: b; }
1382
- CSS
1383
- .foo {a: b}
1384
- @media screen {
1385
- .bar {@extend .foo}
1386
- }
1387
- SCSS
1388
- end
1389
-
1390
- def test_extend_out_of_unknown_directive
1391
- assert_warning(<<WARN) {assert_equal(<<CSS, render(<<SCSS))}
1392
- DEPRECATION WARNING on line 3 of test_extend_out_of_unknown_directive_inline.sass:
1393
- @extending an outer selector from within @flooblehoof is deprecated.
1394
- You may only @extend selectors within the same directive.
1395
- This will be an error in Sass 3.3.
1396
- It can only work once @extend is supported natively in the browser.
1397
- WARN
1398
- .foo {
1399
- a: b; }
1400
-
1401
- @flooblehoof {}
1402
- CSS
1403
- .foo {a: b}
1404
- @flooblehoof {
1405
- .bar {@extend .foo}
1406
- }
1407
- SCSS
1408
- end
1409
-
1410
- def test_extend_out_of_nested_directives
1411
- assert_warning(<<WARN) {assert_equal(<<CSS, render(<<SCSS))}
1412
- DEPRECATION WARNING on line 4 of test_extend_out_of_nested_directives_inline.sass:
1413
- @extending an outer selector from within @flooblehoof is deprecated.
1414
- You may only @extend selectors within the same directive.
1415
- This will be an error in Sass 3.3.
1416
- It can only work once @extend is supported natively in the browser.
1417
- WARN
1418
- @media screen {
1419
- .foo {
1420
- a: b; }
1421
-
1422
- @flooblehoof {} }
1423
- CSS
1424
- @media screen {
1425
- .foo {a: b}
1426
- @flooblehoof {
1427
- .bar {@extend .foo}
1428
- }
1429
- }
1430
- SCSS
1431
- end
1432
-
1433
- def test_extend_within_media
1434
- assert_equal(<<CSS, render(<<SCSS))
1435
- @media screen {
1436
- .foo, .bar {
1437
- a: b; } }
1438
- CSS
1439
- @media screen {
1440
- .foo {a: b}
1441
- .bar {@extend .foo}
1442
- }
1443
- SCSS
1444
- end
1445
-
1446
- def test_extend_within_unknown_directive
1447
- assert_equal(<<CSS, render(<<SCSS))
1448
- @flooblehoof {
1449
- .foo, .bar {
1450
- a: b; } }
1451
- CSS
1452
- @flooblehoof {
1453
- .foo {a: b}
1454
- .bar {@extend .foo}
1455
- }
1456
- SCSS
1457
- end
1458
-
1459
- def test_extend_within_nested_directives
1460
- assert_equal(<<CSS, render(<<SCSS))
1461
- @media screen {
1462
- @flooblehoof {
1463
- .foo, .bar {
1464
- a: b; } } }
1465
- CSS
1466
- @media screen {
1467
- @flooblehoof {
1468
- .foo {a: b}
1469
- .bar {@extend .foo}
1470
- }
1471
- }
1472
- SCSS
1473
- end
1474
-
1475
- def test_extend_within_disparate_media
1476
- assert_equal(<<CSS, render(<<SCSS))
1477
- @media screen {
1478
- .foo, .bar {
1479
- a: b; } }
1480
- CSS
1481
- @media screen {.foo {a: b}}
1482
- @media screen {.bar {@extend .foo}}
1483
- SCSS
1484
- end
1485
-
1486
- def test_extend_within_disparate_unknown_directive
1487
- assert_equal(<<CSS, render(<<SCSS))
1488
- @flooblehoof {
1489
- .foo, .bar {
1490
- a: b; } }
1491
-
1492
- @flooblehoof {}
1493
- CSS
1494
- @flooblehoof {.foo {a: b}}
1495
- @flooblehoof {.bar {@extend .foo}}
1496
- SCSS
1497
- end
1498
-
1499
- def test_extend_within_disparate_nested_directives
1500
- assert_equal(<<CSS, render(<<SCSS))
1501
- @media screen {
1502
- @flooblehoof {
1503
- .foo, .bar {
1504
- a: b; } } }
1505
- @media screen {
1506
- @flooblehoof {} }
1507
- CSS
1508
- @media screen {@flooblehoof {.foo {a: b}}}
1509
- @media screen {@flooblehoof {.bar {@extend .foo}}}
1510
- SCSS
1511
- end
1512
-
1513
- def test_extend_within_and_without_media
1514
- assert_warning(<<WARN) {assert_equal(<<CSS, render(<<SCSS))}
1515
- DEPRECATION WARNING on line 4 of test_extend_within_and_without_media_inline.sass:
1516
- @extending an outer selector from within @media is deprecated.
1517
- You may only @extend selectors within the same directive.
1518
- This will be an error in Sass 3.3.
1519
- It can only work once @extend is supported natively in the browser.
1520
- WARN
1521
- .foo {
1522
- a: b; }
1523
-
1524
- @media screen {
1525
- .foo, .bar {
1526
- c: d; } }
1527
- CSS
1528
- .foo {a: b}
1529
- @media screen {
1530
- .foo {c: d}
1531
- .bar {@extend .foo}
1532
- }
1533
- SCSS
1534
- end
1535
-
1536
- def test_extend_within_and_without_unknown_directive
1537
- assert_warning(<<WARN) {assert_equal(<<CSS, render(<<SCSS))}
1538
- DEPRECATION WARNING on line 4 of test_extend_within_and_without_unknown_directive_inline.sass:
1539
- @extending an outer selector from within @flooblehoof is deprecated.
1540
- You may only @extend selectors within the same directive.
1541
- This will be an error in Sass 3.3.
1542
- It can only work once @extend is supported natively in the browser.
1543
- WARN
1544
- .foo {
1545
- a: b; }
1546
-
1547
- @flooblehoof {
1548
- .foo, .bar {
1549
- c: d; } }
1550
- CSS
1551
- .foo {a: b}
1552
- @flooblehoof {
1553
- .foo {c: d}
1554
- .bar {@extend .foo}
1555
- }
1556
- SCSS
1557
- end
1558
-
1559
- def test_extend_within_and_without_nested_directives
1560
- assert_warning(<<WARN) {assert_equal(<<CSS, render(<<SCSS))}
1561
- DEPRECATION WARNING on line 5 of test_extend_within_and_without_nested_directives_inline.sass:
1562
- @extending an outer selector from within @flooblehoof is deprecated.
1563
- You may only @extend selectors within the same directive.
1564
- This will be an error in Sass 3.3.
1565
- It can only work once @extend is supported natively in the browser.
1566
- WARN
1567
- @media screen {
1568
- .foo {
1569
- a: b; }
1570
-
1571
- @flooblehoof {
1572
- .foo, .bar {
1573
- c: d; } } }
1574
- CSS
1575
- @media screen {
1576
- .foo {a: b}
1577
- @flooblehoof {
1578
- .foo {c: d}
1579
- .bar {@extend .foo}
1580
- }
1581
- }
1582
- SCSS
1583
- end
1584
-
1585
- # Regression Tests
1586
-
1587
- def test_duplicated_selector_with_newlines
1588
- assert_equal(<<CSS, render(<<SCSS))
1589
- .example-1-1,
1590
- .example-1-2,
1591
- .my-page-1 .my-module-1-1,
1592
- .example-1-3 {
1593
- a: b; }
1594
- CSS
1595
- .example-1-1,
1596
- .example-1-2,
1597
- .example-1-3 {
1598
- a: b;
1599
- }
1600
-
1601
- .my-page-1 .my-module-1-1 {@extend .example-1-2}
1602
- SCSS
1603
- end
1604
-
1605
- def test_nested_selector_with_child_selector_hack_extendee
1606
- assert_equal <<CSS, render(<<SCSS)
1607
- > .foo, > foo bar {
1608
- a: b; }
1609
- CSS
1610
- > .foo {a: b}
1611
- foo bar {@extend .foo}
1612
- SCSS
1613
- end
1614
-
1615
- def test_nested_selector_with_child_selector_hack_extender
1616
- assert_equal <<CSS, render(<<SCSS)
1617
- .foo .bar, > .foo foo bar, > foo .foo bar {
1618
- a: b; }
1619
- CSS
1620
- .foo .bar {a: b}
1621
- > foo bar {@extend .bar}
1622
- SCSS
1623
- end
1624
-
1625
- def test_nested_selector_with_child_selector_hack_extender_and_extendee
1626
- assert_equal <<CSS, render(<<SCSS)
1627
- > .foo, > foo bar {
1628
- a: b; }
1629
- CSS
1630
- > .foo {a: b}
1631
- > foo bar {@extend .foo}
1632
- SCSS
1633
- end
1634
-
1635
- def test_nested_selector_with_child_selector_hack_extender_and_sibling_selector_extendee
1636
- assert_equal <<CSS, render(<<SCSS)
1637
- ~ .foo {
1638
- a: b; }
1639
- CSS
1640
- ~ .foo {a: b}
1641
- > foo bar {@extend .foo}
1642
- SCSS
1643
- end
1644
-
1645
- def test_nested_selector_with_child_selector_hack_extender_and_extendee_and_newline
1646
- assert_equal <<CSS, render(<<SCSS)
1647
- > .foo, > flip,
1648
- > foo bar {
1649
- a: b; }
1650
- CSS
1651
- > .foo {a: b}
1652
- flip,
1653
- > foo bar {@extend .foo}
1654
- SCSS
1655
- end
1656
-
1657
1342
  private
1658
1343
 
1659
1344
  def render(sass, options = {})
@@ -76,7 +76,7 @@ class SassFunctionTest < Test::Unit::TestCase
76
76
 
77
77
  def test_hsl_checks_bounds
78
78
  assert_error_message("Saturation -114 must be between 0% and 100% for `hsl'", "hsl(10, -114, 12)");
79
- assert_error_message("Lightness 256% must be between 0% and 100% for `hsl'", "hsl(10, 10, 256%)");
79
+ assert_error_message("Lightness 256 must be between 0% and 100% for `hsl'", "hsl(10, 10, 256%)");
80
80
  end
81
81
 
82
82
  def test_hsl_checks_types
@@ -94,7 +94,7 @@ class SassFunctionTest < Test::Unit::TestCase
94
94
 
95
95
  def test_hsla_checks_bounds
96
96
  assert_error_message("Saturation -114 must be between 0% and 100% for `hsla'", "hsla(10, -114, 12, 1)");
97
- assert_error_message("Lightness 256% must be between 0% and 100% for `hsla'", "hsla(10, 10, 256%, 0)");
97
+ assert_error_message("Lightness 256 must be between 0% and 100% for `hsla'", "hsla(10, 10, 256%, 0)");
98
98
  assert_error_message("Alpha channel -0.1 must be between 0 and 1 for `hsla'", "hsla(10, 10, 10, -0.1)");
99
99
  assert_error_message("Alpha channel 1.1 must be between 0 and 1 for `hsla'", "hsla(10, 10, 10, 1.1)");
100
100
  end
@@ -169,24 +169,24 @@ class SassFunctionTest < Test::Unit::TestCase
169
169
  end
170
170
 
171
171
  def test_rgb_tests_bounds
172
- assert_error_message("Color value 256 must be between 0 and 255 for `rgb'",
172
+ assert_error_message("Color value 256 must be between 0 and 255 inclusive for `rgb'",
173
173
  "rgb(256, 1, 1)")
174
- assert_error_message("Color value 256 must be between 0 and 255 for `rgb'",
174
+ assert_error_message("Color value 256 must be between 0 and 255 inclusive for `rgb'",
175
175
  "rgb(1, 256, 1)")
176
- assert_error_message("Color value 256 must be between 0 and 255 for `rgb'",
176
+ assert_error_message("Color value 256 must be between 0 and 255 inclusive for `rgb'",
177
177
  "rgb(1, 1, 256)")
178
- assert_error_message("Color value 256 must be between 0 and 255 for `rgb'",
178
+ assert_error_message("Color value 256 must be between 0 and 255 inclusive for `rgb'",
179
179
  "rgb(1, 256, 257)")
180
- assert_error_message("Color value -1 must be between 0 and 255 for `rgb'",
180
+ assert_error_message("Color value -1 must be between 0 and 255 inclusive for `rgb'",
181
181
  "rgb(-1, 1, 1)")
182
182
  end
183
183
 
184
184
  def test_rgb_test_percent_bounds
185
- assert_error_message("Color value 100.1% must be between 0% and 100% for `rgb'",
185
+ assert_error_message("Color value 100.1% must be between 0% and 100% inclusive for `rgb'",
186
186
  "rgb(100.1%, 0, 0)")
187
- assert_error_message("Color value -0.1% must be between 0% and 100% for `rgb'",
187
+ assert_error_message("Color value -0.1% must be between 0% and 100% inclusive for `rgb'",
188
188
  "rgb(0, -0.1%, 0)")
189
- assert_error_message("Color value 101% must be between 0% and 100% for `rgb'",
189
+ assert_error_message("Color value 101% must be between 0% and 100% inclusive for `rgb'",
190
190
  "rgb(0, 0, 101%)")
191
191
  end
192
192
 
@@ -204,19 +204,19 @@ class SassFunctionTest < Test::Unit::TestCase
204
204
  end
205
205
 
206
206
  def test_rgb_tests_bounds
207
- assert_error_message("Color value 256 must be between 0 and 255 for `rgba'",
207
+ assert_error_message("Color value 256 must be between 0 and 255 inclusive for `rgba'",
208
208
  "rgba(256, 1, 1, 0.3)")
209
- assert_error_message("Color value 256 must be between 0 and 255 for `rgba'",
209
+ assert_error_message("Color value 256 must be between 0 and 255 inclusive for `rgba'",
210
210
  "rgba(1, 256, 1, 0.3)")
211
- assert_error_message("Color value 256 must be between 0 and 255 for `rgba'",
211
+ assert_error_message("Color value 256 must be between 0 and 255 inclusive for `rgba'",
212
212
  "rgba(1, 1, 256, 0.3)")
213
- assert_error_message("Color value 256 must be between 0 and 255 for `rgba'",
213
+ assert_error_message("Color value 256 must be between 0 and 255 inclusive for `rgba'",
214
214
  "rgba(1, 256, 257, 0.3)")
215
- assert_error_message("Color value -1 must be between 0 and 255 for `rgba'",
215
+ assert_error_message("Color value -1 must be between 0 and 255 inclusive for `rgba'",
216
216
  "rgba(-1, 1, 1, 0.3)")
217
- assert_error_message("Alpha channel -0.2 must be between 0 and 1 for `rgba'",
217
+ assert_error_message("Alpha channel -0.2 must be between 0 and 1 inclusive for `rgba'",
218
218
  "rgba(1, 1, 1, -0.2)")
219
- assert_error_message("Alpha channel 1.2 must be between 0 and 1 for `rgba'",
219
+ assert_error_message("Alpha channel 1.2 must be between 0 and 1 inclusive for `rgba'",
220
220
  "rgba(1, 1, 1, 1.2)")
221
221
  end
222
222
 
@@ -312,18 +312,6 @@ class SassFunctionTest < Test::Unit::TestCase
312
312
  assert_error_message("12 is not a color for `alpha'", "alpha(12)")
313
313
  end
314
314
 
315
- def test_opacity
316
- assert_equal("1", evaluate("opacity(#123456)"))
317
- assert_equal("0.34", evaluate("opacity(rgba(0, 1, 2, 0.34))"))
318
- assert_equal("0", evaluate("opacity(hsla(0, 1, 2, 0))"))
319
- assert_equal("0", evaluate("opacity($color: hsla(0, 1, 2, 0))"))
320
- assert_equal("opacity(20%)", evaluate("opacity(20%)"))
321
- end
322
-
323
- def test_opacity_exception
324
- assert_error_message("\"foo\" is not a color for `opacity'", "opacity(foo)")
325
- end
326
-
327
315
  def test_opacify
328
316
  assert_equal("rgba(0, 0, 0, 0.75)", evaluate("opacify(rgba(0, 0, 0, 0.5), 0.25)"))
329
317
  assert_equal("rgba(0, 0, 0, 0.3)", evaluate("opacify(rgba(0, 0, 0, 0.2), 0.1)"))
@@ -423,7 +411,6 @@ class SassFunctionTest < Test::Unit::TestCase
423
411
  assert_equal("#88aa88", evaluate("saturate(#8a8, 0%)"))
424
412
  assert_equal("rgba(158, 63, 63, 0.5)", evaluate("saturate(rgba(136, 85, 85, 0.5), 20%)"))
425
413
  assert_equal("rgba(158, 63, 63, 0.5)", evaluate("saturate($color: rgba(136, 85, 85, 0.5), $amount: 20%)"))
426
- assert_equal("saturate(50%)", evaluate("saturate(50%)"))
427
414
  end
428
415
 
429
416
  def test_saturate_tests_bounds
@@ -726,15 +713,15 @@ class SassFunctionTest < Test::Unit::TestCase
726
713
 
727
714
  def test_change_color_argument_errors
728
715
  # Range
729
- assert_error_message("Saturation 101% must be between 0% and 100% for `change-color'",
716
+ assert_error_message("Saturation must be between 0 and 100 for `change-color'",
730
717
  "change-color(blue, $saturation: 101%)")
731
- assert_error_message("Lightness 101% must be between 0% and 100% for `change-color'",
718
+ assert_error_message("Lightness must be between 0 and 100 for `change-color'",
732
719
  "change-color(blue, $lightness: 101%)")
733
- assert_error_message("Red value -1 must be between 0 and 255 for `change-color'",
720
+ assert_error_message("Red value must be between 0 and 255 for `change-color'",
734
721
  "change-color(blue, $red: -1)")
735
- assert_error_message("Green value 256 must be between 0 and 255 for `change-color'",
722
+ assert_error_message("Green value must be between 0 and 255 for `change-color'",
736
723
  "change-color(blue, $green: 256)")
737
- assert_error_message("Blue value 500 must be between 0 and 255 for `change-color'",
724
+ assert_error_message("Blue value must be between 0 and 255 for `change-color'",
738
725
  "change-color(blue, $blue: 500)")
739
726
 
740
727
  # Unknown argument
@@ -785,9 +772,6 @@ class SassFunctionTest < Test::Unit::TestCase
785
772
  assert_equal("white", evaluate("grayscale(white)"))
786
773
  assert_equal("black", evaluate("grayscale(black)"))
787
774
  assert_equal("black", evaluate("grayscale($color: black)"))
788
-
789
- assert_equal("grayscale(2)", evaluate("grayscale(2)"))
790
- assert_equal("grayscale(-5px)", evaluate("grayscale(-5px)"))
791
775
  end
792
776
 
793
777
  def tets_grayscale_tests_types
@@ -810,7 +794,6 @@ class SassFunctionTest < Test::Unit::TestCase
810
794
  def test_invert
811
795
  assert_equal("#112233", evaluate("invert(#edc)"))
812
796
  assert_equal("rgba(245, 235, 225, 0.5)", evaluate("invert(rgba(10, 20, 30, 0.5))"))
813
- assert_equal("invert(20%)", evaluate("invert(20%)"))
814
797
  end
815
798
 
816
799
  def test_invert_tests_types
@@ -865,8 +848,7 @@ MSG
865
848
  assert_equal(%Q{"px"}, evaluate("unit(100px)"))
866
849
  assert_equal(%Q{"em*px"}, evaluate("unit(10px * 5em)"))
867
850
  assert_equal(%Q{"em*px"}, evaluate("unit(5em * 10px)"))
868
- assert_equal(%Q{"em/rem"}, evaluate("unit(10px * 5em / 30cm / 1rem)"))
869
- assert_equal(%Q{"em*vh/cm*rem"}, evaluate("unit(10vh * 5em / 30cm / 1rem)"))
851
+ assert_equal(%Q{"em*px/cm*rem"}, evaluate("unit(10px * 5em / 30cm / 1rem)"))
870
852
  assert_equal(%Q{"px"}, evaluate("unit($number: 100px)"))
871
853
  assert_error_message("#ff0000 is not a number for `unit'", "unit(#f00)")
872
854
  end
@@ -983,19 +965,6 @@ MSG
983
965
  assert_error_message("Separator name must be space, comma, or auto for `append'", "append(1, 2, baboon)")
984
966
  end
985
967
 
986
- def test_zip
987
- assert_equal("1 3 5, 2 4 6", evaluate("zip(1 2, 3 4, 5 6)"))
988
- assert_equal("1 4 7, 2 5 8", evaluate("zip(1 2 3, 4 5 6, 7 8)"))
989
- end
990
-
991
- def test_index
992
- assert_equal("1", evaluate("index(1px solid blue, 1px)"))
993
- assert_equal("2", evaluate("index(1px solid blue, solid)"))
994
- assert_equal("3", evaluate("index(1px solid blue, #00f)"))
995
- assert_equal("false", evaluate("index(1px solid blue, 1em)"))
996
- assert_equal("false", evaluate("index(1px solid blue, notfound)"))
997
- end
998
-
999
968
  def test_if
1000
969
  assert_equal("1px", evaluate("if(true, 1px, 2px)"))
1001
970
  assert_equal("2px", evaluate("if(false, 1px, 2px)"))
@@ -1036,12 +1005,6 @@ MSG
1036
1005
  assert_equal "only-kw-args(a, b, c)", evaluate("only-kw-args($a: 1, $b: 2, $c: 3)")
1037
1006
  end
1038
1007
 
1039
- ## Regression Tests
1040
-
1041
- def test_saturation_bounds
1042
- assert_equal "#fbfdff", evaluate("hsl(hue(#fbfdff), saturation(#fbfdff), lightness(#fbfdff))")
1043
- end
1044
-
1045
1008
  private
1046
1009
 
1047
1010
  def evaluate(value)