sass 3.6.0 → 3.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (138) hide show
  1. checksums.yaml +5 -5
  2. data/CONTRIBUTING.md +1 -1
  3. data/README.md +10 -0
  4. data/VERSION +1 -1
  5. data/VERSION_DATE +1 -1
  6. data/lib/sass/script/css_parser.rb +4 -1
  7. data/lib/sass/script/functions.rb +15 -25
  8. data/lib/sass/script/lexer.rb +45 -7
  9. data/lib/sass/script/parser.rb +259 -93
  10. data/lib/sass/scss/parser.rb +43 -16
  11. data/lib/sass/scss/static_parser.rb +15 -15
  12. data/lib/sass/util.rb +31 -0
  13. metadata +8 -156
  14. data/Rakefile +0 -364
  15. data/test/sass-spec.yml +0 -3
  16. data/test/sass/cache_test.rb +0 -130
  17. data/test/sass/callbacks_test.rb +0 -60
  18. data/test/sass/compiler_test.rb +0 -225
  19. data/test/sass/conversion_test.rb +0 -2138
  20. data/test/sass/css2sass_test.rb +0 -523
  21. data/test/sass/css_variable_test.rb +0 -237
  22. data/test/sass/data/hsl-rgb.txt +0 -319
  23. data/test/sass/encoding_test.rb +0 -188
  24. data/test/sass/engine_test.rb +0 -3499
  25. data/test/sass/exec_test.rb +0 -95
  26. data/test/sass/extend_test.rb +0 -1679
  27. data/test/sass/fixtures/test_staleness_check_across_importers.css +0 -1
  28. data/test/sass/fixtures/test_staleness_check_across_importers.scss +0 -1
  29. data/test/sass/functions_test.rb +0 -2021
  30. data/test/sass/importer_test.rb +0 -420
  31. data/test/sass/logger_test.rb +0 -57
  32. data/test/sass/mock_importer.rb +0 -49
  33. data/test/sass/more_results/more1.css +0 -9
  34. data/test/sass/more_results/more1_with_line_comments.css +0 -26
  35. data/test/sass/more_results/more_import.css +0 -29
  36. data/test/sass/more_templates/_more_partial.sass +0 -2
  37. data/test/sass/more_templates/more1.sass +0 -23
  38. data/test/sass/more_templates/more_import.sass +0 -11
  39. data/test/sass/plugin_test.rb +0 -552
  40. data/test/sass/results/alt.css +0 -4
  41. data/test/sass/results/basic.css +0 -9
  42. data/test/sass/results/cached_import_option.css +0 -3
  43. data/test/sass/results/compact.css +0 -5
  44. data/test/sass/results/complex.css +0 -86
  45. data/test/sass/results/compressed.css +0 -1
  46. data/test/sass/results/expanded.css +0 -19
  47. data/test/sass/results/filename_fn.css +0 -3
  48. data/test/sass/results/if.css +0 -3
  49. data/test/sass/results/import.css +0 -31
  50. data/test/sass/results/import_charset.css +0 -5
  51. data/test/sass/results/import_charset_ibm866.css +0 -5
  52. data/test/sass/results/import_content.css +0 -1
  53. data/test/sass/results/line_numbers.css +0 -49
  54. data/test/sass/results/mixins.css +0 -95
  55. data/test/sass/results/multiline.css +0 -24
  56. data/test/sass/results/nested.css +0 -22
  57. data/test/sass/results/options.css +0 -1
  58. data/test/sass/results/parent_ref.css +0 -13
  59. data/test/sass/results/script.css +0 -16
  60. data/test/sass/results/scss_import.css +0 -31
  61. data/test/sass/results/scss_importee.css +0 -2
  62. data/test/sass/results/subdir/nested_subdir/nested_subdir.css +0 -1
  63. data/test/sass/results/subdir/subdir.css +0 -3
  64. data/test/sass/results/units.css +0 -11
  65. data/test/sass/results/warn.css +0 -0
  66. data/test/sass/results/warn_imported.css +0 -0
  67. data/test/sass/script_conversion_test.rb +0 -365
  68. data/test/sass/script_test.rb +0 -1427
  69. data/test/sass/scss/css_test.rb +0 -1266
  70. data/test/sass/scss/rx_test.rb +0 -159
  71. data/test/sass/scss/scss_test.rb +0 -4238
  72. data/test/sass/scss/test_helper.rb +0 -37
  73. data/test/sass/source_map_test.rb +0 -1063
  74. data/test/sass/superselector_test.rb +0 -209
  75. data/test/sass/templates/_cached_import_option_partial.scss +0 -1
  76. data/test/sass/templates/_double_import_loop2.sass +0 -1
  77. data/test/sass/templates/_filename_fn_import.scss +0 -11
  78. data/test/sass/templates/_imported_charset_ibm866.sass +0 -4
  79. data/test/sass/templates/_imported_charset_utf8.sass +0 -4
  80. data/test/sass/templates/_imported_content.sass +0 -3
  81. data/test/sass/templates/_partial.sass +0 -2
  82. data/test/sass/templates/_same_name_different_partiality.scss +0 -1
  83. data/test/sass/templates/alt.sass +0 -16
  84. data/test/sass/templates/basic.sass +0 -23
  85. data/test/sass/templates/bork1.sass +0 -2
  86. data/test/sass/templates/bork2.sass +0 -2
  87. data/test/sass/templates/bork3.sass +0 -2
  88. data/test/sass/templates/bork4.sass +0 -2
  89. data/test/sass/templates/bork5.sass +0 -3
  90. data/test/sass/templates/cached_import_option.scss +0 -3
  91. data/test/sass/templates/compact.sass +0 -17
  92. data/test/sass/templates/complex.sass +0 -305
  93. data/test/sass/templates/compressed.sass +0 -15
  94. data/test/sass/templates/double_import_loop1.sass +0 -1
  95. data/test/sass/templates/expanded.sass +0 -17
  96. data/test/sass/templates/filename_fn.scss +0 -18
  97. data/test/sass/templates/if.sass +0 -11
  98. data/test/sass/templates/import.sass +0 -12
  99. data/test/sass/templates/import_charset.sass +0 -9
  100. data/test/sass/templates/import_charset_ibm866.sass +0 -11
  101. data/test/sass/templates/import_content.sass +0 -4
  102. data/test/sass/templates/importee.less +0 -2
  103. data/test/sass/templates/importee.sass +0 -19
  104. data/test/sass/templates/line_numbers.sass +0 -13
  105. data/test/sass/templates/mixin_bork.sass +0 -5
  106. data/test/sass/templates/mixins.sass +0 -76
  107. data/test/sass/templates/multiline.sass +0 -20
  108. data/test/sass/templates/nested.sass +0 -25
  109. data/test/sass/templates/nested_bork1.sass +0 -2
  110. data/test/sass/templates/nested_bork2.sass +0 -2
  111. data/test/sass/templates/nested_bork3.sass +0 -2
  112. data/test/sass/templates/nested_bork4.sass +0 -2
  113. data/test/sass/templates/nested_import.sass +0 -2
  114. data/test/sass/templates/nested_mixin_bork.sass +0 -6
  115. data/test/sass/templates/options.sass +0 -2
  116. data/test/sass/templates/parent_ref.sass +0 -25
  117. data/test/sass/templates/same_name_different_ext.sass +0 -2
  118. data/test/sass/templates/same_name_different_ext.scss +0 -1
  119. data/test/sass/templates/same_name_different_partiality.scss +0 -1
  120. data/test/sass/templates/script.sass +0 -101
  121. data/test/sass/templates/scss_import.scss +0 -12
  122. data/test/sass/templates/scss_importee.scss +0 -1
  123. data/test/sass/templates/single_import_loop.sass +0 -1
  124. data/test/sass/templates/subdir/import_up1.scss +0 -1
  125. data/test/sass/templates/subdir/import_up2.scss +0 -1
  126. data/test/sass/templates/subdir/nested_subdir/_nested_partial.sass +0 -2
  127. data/test/sass/templates/subdir/nested_subdir/nested_subdir.sass +0 -3
  128. data/test/sass/templates/subdir/subdir.sass +0 -6
  129. data/test/sass/templates/units.sass +0 -11
  130. data/test/sass/templates/warn.sass +0 -3
  131. data/test/sass/templates/warn_imported.sass +0 -4
  132. data/test/sass/test_helper.rb +0 -8
  133. data/test/sass/util/multibyte_string_scanner_test.rb +0 -152
  134. data/test/sass/util/normalized_map_test.rb +0 -50
  135. data/test/sass/util/subset_map_test.rb +0 -90
  136. data/test/sass/util_test.rb +0 -393
  137. data/test/sass/value_helpers_test.rb +0 -178
  138. data/test/test_helper.rb +0 -149
@@ -1,15 +0,0 @@
1
- #main
2
- width: 15em
3
- color: #0000ff
4
- p
5
- border:
6
- style: dotted
7
- width: 2px
8
- .cool
9
- width: 100px
10
-
11
- #left
12
- font:
13
- size: 2em
14
- weight: bold
15
- float: left
@@ -1 +0,0 @@
1
- @import "double_import_loop2"
@@ -1,17 +0,0 @@
1
- #main
2
- width: 15em
3
- color: #0000ff
4
- p
5
- border:
6
- style: dotted
7
- /* Nested comment
8
- More nested stuff
9
- width: 2px
10
- .cool
11
- width: 100px
12
-
13
- #left
14
- font:
15
- size: 2em
16
- weight: bold
17
- float: left
@@ -1,18 +0,0 @@
1
- @import "filename_fn_import";
2
-
3
- @mixin local-mixin {
4
- local-mixin: filename();
5
- }
6
-
7
- @function local-function() {
8
- @return filename();
9
- }
10
-
11
- filename {
12
- local: filename();
13
- @include local-mixin;
14
- local-function: local-function();
15
-
16
- @include imported-mixin;
17
- imported-function: imported-function();
18
- }
@@ -1,11 +0,0 @@
1
- a
2
- @if true
3
- branch: if
4
- @else
5
- branch: else
6
-
7
- b
8
- @if false
9
- branch: if
10
- @else
11
- branch: else
@@ -1,12 +0,0 @@
1
- $preconst: hello
2
-
3
- =premixin
4
- pre-mixin: here
5
-
6
- @import importee.sass, scss_importee, "basic.sass", basic.css, ../results/complex.css
7
- @import partial.sass
8
-
9
- nonimported
10
- myconst: $preconst
11
- otherconst: $postconst
12
- +postmixin
@@ -1,9 +0,0 @@
1
- .foo
2
- a: b
3
-
4
- @import "foo.css"
5
-
6
- // Even though the imported file is in IBM866,
7
- // since the root file is in UTF-8/ASCII
8
- // the output will end up being UTF-8.
9
- @import "imported_charset_ibm866"
@@ -1,11 +0,0 @@
1
- @charset "IBM866"
2
-
3
- .foo
4
- a: b
5
-
6
- @import "foo.css"
7
-
8
- // Even though the imported file is in UTF-8,
9
- // since the root file is in IBM866
10
- // the output will end up being IBM866.
11
- @import "imported_charset_utf8"
@@ -1,4 +0,0 @@
1
- @import imported_content
2
-
3
- @include foo
4
- b: c
@@ -1,2 +0,0 @@
1
- .foo {a: b}
2
- .bar () {c: d}
@@ -1,19 +0,0 @@
1
- $postconst: goodbye
2
-
3
- =postmixin
4
- post-mixin: here
5
-
6
- imported
7
- otherconst: $preconst
8
- myconst: $postconst
9
- +premixin
10
-
11
- @import basic
12
-
13
- midrule
14
- inthe: middle
15
-
16
- =crazymixin
17
- foo: bar
18
- baz
19
- blat: bang
@@ -1,13 +0,0 @@
1
- foo
2
- bar: baz
3
-
4
- =premixin
5
- squggle
6
- blat: bang
7
-
8
- $preconst: 12
9
-
10
- @import importee
11
-
12
- umph
13
- +crazymixin
@@ -1,5 +0,0 @@
1
- =outer-mixin
2
- +error-mixin
3
-
4
- foo
5
- +outer-mixin
@@ -1,76 +0,0 @@
1
- $yellow: #fc0
2
-
3
- =bordered
4
- border:
5
- top:
6
- width: 2px
7
- color: $yellow
8
- left:
9
- width: 1px
10
- color: #000
11
- -moz-border-radius: 10px
12
-
13
- =header-font
14
- color: #f00
15
- font:
16
- size: 20px
17
-
18
- =compound
19
- +header-font
20
- +bordered
21
-
22
- =complex
23
- +header-font
24
- text:
25
- decoration: none
26
- &:after
27
- content: "."
28
- display: block
29
- height: 0
30
- clear: both
31
- visibility: hidden
32
- * html &
33
- height: 1px
34
- +header-font
35
- =deep
36
- a:hover
37
- text-decoration: underline
38
- +compound
39
-
40
-
41
- #main
42
- width: 15em
43
- color: #0000ff
44
- p
45
- +bordered
46
- border:
47
- style: dotted
48
- width: 2px
49
- .cool
50
- width: 100px
51
-
52
- #left
53
- +bordered
54
- font:
55
- size: 2em
56
- weight: bold
57
- float: left
58
-
59
- #right
60
- +bordered
61
- +header-font
62
- float: right
63
-
64
- .bordered
65
- +bordered
66
-
67
- .complex
68
- +complex
69
-
70
- .more-complex
71
- +complex
72
- +deep
73
- display: inline
74
- -webkit-nonsense:
75
- top-right: 1px
76
- bottom-left: 1px
@@ -1,20 +0,0 @@
1
- #main,
2
- #header
3
- height: 50px
4
- div
5
- width: 100px
6
- a,
7
- em
8
- span
9
- color: pink
10
-
11
- #one,
12
- #two,
13
- #three
14
- div.nested,
15
- span.nested,
16
- p.nested
17
- font:
18
- weight: bold
19
- border-color: red
20
- display: block
@@ -1,25 +0,0 @@
1
- #main
2
- width: 15em
3
- color: #0000ff
4
- p
5
- border:
6
- style: dotted
7
- /* Nested comment
8
- More nested stuff
9
- width: 2px
10
- .cool
11
- width: 100px
12
-
13
- #left
14
- font:
15
- size: 2em
16
- weight: bold
17
- float: left
18
-
19
- #right
20
- .header
21
- border-style: solid
22
- .body
23
- border-style: dotted
24
- .footer
25
- border-style: dashed
@@ -1,2 +0,0 @@
1
-
2
- @import bork1
@@ -1,2 +0,0 @@
1
-
2
- @import bork2
@@ -1,2 +0,0 @@
1
-
2
- @import bork3
@@ -1,2 +0,0 @@
1
-
2
- @import bork4
@@ -1,2 +0,0 @@
1
- .foo
2
- @import basic
@@ -1,6 +0,0 @@
1
-
2
-
3
- =error-mixin
4
- width: 1px * 1em
5
-
6
- @import mixin_bork
@@ -1,2 +0,0 @@
1
- foo
2
- style: option("style")
@@ -1,25 +0,0 @@
1
- a
2
- color: #000
3
- &:hover
4
- color: #f00
5
-
6
- p, div
7
- width: 100em
8
- & foo
9
- width: 10em
10
- &:hover, bar
11
- height: 20em
12
-
13
- #cool
14
- border:
15
- style: solid
16
- width: 2em
17
- .ie7 &, .ie6 &
18
- content: string("Totally not cool.")
19
- .firefox &
20
- content: string("Quite cool.")
21
-
22
- .wow, .snazzy
23
- font-family: fantasy
24
- &:hover, &:visited
25
- font-weight: bold
@@ -1,2 +0,0 @@
1
- .foo
2
- ext: sass
@@ -1 +0,0 @@
1
- .foo {ext: scss}
@@ -1 +0,0 @@
1
- .foo {partial: no}
@@ -1,101 +0,0 @@
1
- $width: 10em + 20
2
- $color: #00ff98
3
- $main_text: #ffa
4
- $num: 10
5
- $dec: 10.2
6
- $dec_0: 99.0
7
- $neg: -10
8
- $esc: 10\+12
9
- $str: Hello\!
10
- $qstr: "Quo\"ted\"!"
11
- $hstr: Hyph-en\!
12
- $space: #{5 + 4} hi there
13
- $percent: 11%
14
- $complex: 1px/1em
15
-
16
- #main
17
- content: $str
18
- qstr: $qstr
19
- hstr: $hstr
20
- width: $width
21
- background-color: #000
22
- color: $main_text
23
- short-color: #123
24
- named-color: olive
25
- con: "foo" bar ($space "boom")
26
- con2: "noquo" quo
27
- #sidebar
28
- background-color: $color
29
- num:
30
- normal: $num
31
- dec: $dec
32
- dec0: $dec_0
33
- neg: $neg
34
- esc: $esc
35
- many: 1 + 2 + 3
36
- order: 1 + 2 * 3
37
- complex: ((1 + 2) + 15)+#3a8b9f + (hi+(1 +1+ 2)* 4)
38
-
39
- #plus
40
- num:
41
- num: 5+2
42
- num-un: 10em + 15em
43
- num-un2: 10 + 13em
44
- num-neg: 10 + -.13
45
- str: 100 * 1px
46
- col: 13 + #aaa
47
- perc: $percent + 20%
48
- str:
49
- str: "hi" + "\ there"
50
- str2: "hi" + " there"
51
- col: "14em solid " + #123
52
- num: "times: " + 13
53
- col:
54
- num: #f02 + 123.5
55
- col: #12A + #405162
56
-
57
- #minus
58
- num:
59
- num: 912 - 12
60
- col:
61
- num: #fffffa - 5.2
62
- col: #abcdef - #fedcba
63
- unary:
64
- num: -1
65
- const: -$neg
66
- paren: -(5 + 6)
67
- two: --12
68
- many: --------12
69
- crazy: -----(5 + ---$neg)
70
-
71
- #times
72
- num:
73
- num: 2 * 3.5
74
- col: 2 * #3a4b5c
75
- col:
76
- num: #12468a * 0.5
77
- col: #121212 * #020304
78
-
79
- #div
80
- num:
81
- num: (10 / 3.0)
82
- num2: (10 / 3)
83
- col:
84
- num: #12468a / 2
85
- col: #abcdef / #0f0f0f
86
- comp: $complex * 1em
87
-
88
- #mod
89
- num:
90
- num: 17 % 3
91
- col:
92
- col: #5f6e7d % #10200a
93
- num: #aaabac % 3
94
-
95
- #const
96
- escaped:
97
- quote: \$foo \!bar
98
- default: $str !important
99
-
100
- #regression
101
- a: (3 + 2) - 1