haml-edge 2.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (180) hide show
  1. data/EDGE_GEM_VERSION +1 -0
  2. data/FAQ +138 -0
  3. data/MIT-LICENSE +20 -0
  4. data/README.rdoc +332 -0
  5. data/REVISION +1 -0
  6. data/Rakefile +226 -0
  7. data/VERSION +1 -0
  8. data/bin/css2sass +7 -0
  9. data/bin/haml +9 -0
  10. data/bin/html2haml +7 -0
  11. data/bin/sass +8 -0
  12. data/extra/edge_gem_watch.rb +13 -0
  13. data/extra/haml-mode.el +596 -0
  14. data/extra/sass-mode.el +200 -0
  15. data/init.rb +8 -0
  16. data/lib/haml/buffer.rb +255 -0
  17. data/lib/haml/engine.rb +268 -0
  18. data/lib/haml/error.rb +22 -0
  19. data/lib/haml/exec.rb +395 -0
  20. data/lib/haml/filters.rb +275 -0
  21. data/lib/haml/helpers/action_view_extensions.rb +45 -0
  22. data/lib/haml/helpers/action_view_mods.rb +181 -0
  23. data/lib/haml/helpers.rb +488 -0
  24. data/lib/haml/html.rb +222 -0
  25. data/lib/haml/precompiler.rb +904 -0
  26. data/lib/haml/shared.rb +45 -0
  27. data/lib/haml/template/patch.rb +58 -0
  28. data/lib/haml/template/plugin.rb +72 -0
  29. data/lib/haml/template.rb +42 -0
  30. data/lib/haml/util.rb +88 -0
  31. data/lib/haml/version.rb +47 -0
  32. data/lib/haml.rb +1044 -0
  33. data/lib/sass/css.rb +388 -0
  34. data/lib/sass/engine.rb +495 -0
  35. data/lib/sass/environment.rb +46 -0
  36. data/lib/sass/error.rb +35 -0
  37. data/lib/sass/plugin/merb.rb +56 -0
  38. data/lib/sass/plugin/rails.rb +24 -0
  39. data/lib/sass/plugin.rb +204 -0
  40. data/lib/sass/repl.rb +51 -0
  41. data/lib/sass/script/bool.rb +13 -0
  42. data/lib/sass/script/color.rb +97 -0
  43. data/lib/sass/script/funcall.rb +29 -0
  44. data/lib/sass/script/functions.rb +134 -0
  45. data/lib/sass/script/lexer.rb +148 -0
  46. data/lib/sass/script/literal.rb +82 -0
  47. data/lib/sass/script/number.rb +231 -0
  48. data/lib/sass/script/operation.rb +30 -0
  49. data/lib/sass/script/parser.rb +142 -0
  50. data/lib/sass/script/string.rb +9 -0
  51. data/lib/sass/script/unary_operation.rb +21 -0
  52. data/lib/sass/script/variable.rb +20 -0
  53. data/lib/sass/script.rb +38 -0
  54. data/lib/sass/tree/attr_node.rb +64 -0
  55. data/lib/sass/tree/comment_node.rb +30 -0
  56. data/lib/sass/tree/debug_node.rb +22 -0
  57. data/lib/sass/tree/directive_node.rb +50 -0
  58. data/lib/sass/tree/file_node.rb +27 -0
  59. data/lib/sass/tree/for_node.rb +29 -0
  60. data/lib/sass/tree/if_node.rb +27 -0
  61. data/lib/sass/tree/mixin_def_node.rb +18 -0
  62. data/lib/sass/tree/mixin_node.rb +35 -0
  63. data/lib/sass/tree/node.rb +99 -0
  64. data/lib/sass/tree/rule_node.rb +161 -0
  65. data/lib/sass/tree/variable_node.rb +24 -0
  66. data/lib/sass/tree/while_node.rb +21 -0
  67. data/lib/sass.rb +1062 -0
  68. data/rails/init.rb +1 -0
  69. data/test/benchmark.rb +99 -0
  70. data/test/haml/engine_test.rb +795 -0
  71. data/test/haml/helper_test.rb +228 -0
  72. data/test/haml/html2haml_test.rb +108 -0
  73. data/test/haml/markaby/standard.mab +52 -0
  74. data/test/haml/mocks/article.rb +6 -0
  75. data/test/haml/results/content_for_layout.xhtml +15 -0
  76. data/test/haml/results/eval_suppressed.xhtml +9 -0
  77. data/test/haml/results/filters.xhtml +62 -0
  78. data/test/haml/results/helpers.xhtml +93 -0
  79. data/test/haml/results/helpful.xhtml +10 -0
  80. data/test/haml/results/just_stuff.xhtml +68 -0
  81. data/test/haml/results/list.xhtml +12 -0
  82. data/test/haml/results/nuke_inner_whitespace.xhtml +40 -0
  83. data/test/haml/results/nuke_outer_whitespace.xhtml +148 -0
  84. data/test/haml/results/original_engine.xhtml +20 -0
  85. data/test/haml/results/partial_layout.xhtml +5 -0
  86. data/test/haml/results/partials.xhtml +21 -0
  87. data/test/haml/results/render_layout.xhtml +3 -0
  88. data/test/haml/results/silent_script.xhtml +74 -0
  89. data/test/haml/results/standard.xhtml +162 -0
  90. data/test/haml/results/tag_parsing.xhtml +23 -0
  91. data/test/haml/results/very_basic.xhtml +5 -0
  92. data/test/haml/results/whitespace_handling.xhtml +89 -0
  93. data/test/haml/rhtml/_av_partial_1.rhtml +12 -0
  94. data/test/haml/rhtml/_av_partial_2.rhtml +8 -0
  95. data/test/haml/rhtml/action_view.rhtml +62 -0
  96. data/test/haml/rhtml/standard.rhtml +54 -0
  97. data/test/haml/template_test.rb +204 -0
  98. data/test/haml/templates/_av_partial_1.haml +9 -0
  99. data/test/haml/templates/_av_partial_1_ugly.haml +9 -0
  100. data/test/haml/templates/_av_partial_2.haml +5 -0
  101. data/test/haml/templates/_av_partial_2_ugly.haml +5 -0
  102. data/test/haml/templates/_layout.erb +3 -0
  103. data/test/haml/templates/_layout_for_partial.haml +3 -0
  104. data/test/haml/templates/_partial.haml +8 -0
  105. data/test/haml/templates/_text_area.haml +3 -0
  106. data/test/haml/templates/action_view.haml +47 -0
  107. data/test/haml/templates/action_view_ugly.haml +47 -0
  108. data/test/haml/templates/breakage.haml +8 -0
  109. data/test/haml/templates/content_for_layout.haml +10 -0
  110. data/test/haml/templates/eval_suppressed.haml +11 -0
  111. data/test/haml/templates/filters.haml +66 -0
  112. data/test/haml/templates/helpers.haml +95 -0
  113. data/test/haml/templates/helpful.haml +11 -0
  114. data/test/haml/templates/just_stuff.haml +83 -0
  115. data/test/haml/templates/list.haml +12 -0
  116. data/test/haml/templates/nuke_inner_whitespace.haml +32 -0
  117. data/test/haml/templates/nuke_outer_whitespace.haml +144 -0
  118. data/test/haml/templates/original_engine.haml +17 -0
  119. data/test/haml/templates/partial_layout.haml +3 -0
  120. data/test/haml/templates/partialize.haml +1 -0
  121. data/test/haml/templates/partials.haml +12 -0
  122. data/test/haml/templates/render_layout.haml +2 -0
  123. data/test/haml/templates/silent_script.haml +40 -0
  124. data/test/haml/templates/standard.haml +42 -0
  125. data/test/haml/templates/standard_ugly.haml +42 -0
  126. data/test/haml/templates/tag_parsing.haml +21 -0
  127. data/test/haml/templates/very_basic.haml +4 -0
  128. data/test/haml/templates/whitespace_handling.haml +87 -0
  129. data/test/haml/util_test.rb +87 -0
  130. data/test/linked_rails.rb +12 -0
  131. data/test/sass/css2sass_test.rb +193 -0
  132. data/test/sass/engine_test.rb +709 -0
  133. data/test/sass/functions_test.rb +109 -0
  134. data/test/sass/more_results/more1.css +9 -0
  135. data/test/sass/more_results/more1_with_line_comments.css +26 -0
  136. data/test/sass/more_results/more_import.css +29 -0
  137. data/test/sass/more_templates/_more_partial.sass +2 -0
  138. data/test/sass/more_templates/more1.sass +23 -0
  139. data/test/sass/more_templates/more_import.sass +11 -0
  140. data/test/sass/plugin_test.rb +213 -0
  141. data/test/sass/results/alt.css +4 -0
  142. data/test/sass/results/basic.css +9 -0
  143. data/test/sass/results/compact.css +5 -0
  144. data/test/sass/results/complex.css +87 -0
  145. data/test/sass/results/compressed.css +1 -0
  146. data/test/sass/results/expanded.css +19 -0
  147. data/test/sass/results/import.css +29 -0
  148. data/test/sass/results/line_numbers.css +49 -0
  149. data/test/sass/results/mixins.css +95 -0
  150. data/test/sass/results/multiline.css +24 -0
  151. data/test/sass/results/nested.css +22 -0
  152. data/test/sass/results/parent_ref.css +13 -0
  153. data/test/sass/results/script.css +16 -0
  154. data/test/sass/results/subdir/nested_subdir/nested_subdir.css +1 -0
  155. data/test/sass/results/subdir/subdir.css +3 -0
  156. data/test/sass/results/units.css +11 -0
  157. data/test/sass/script_test.rb +250 -0
  158. data/test/sass/templates/_partial.sass +2 -0
  159. data/test/sass/templates/alt.sass +16 -0
  160. data/test/sass/templates/basic.sass +23 -0
  161. data/test/sass/templates/bork.sass +2 -0
  162. data/test/sass/templates/bork2.sass +2 -0
  163. data/test/sass/templates/compact.sass +17 -0
  164. data/test/sass/templates/complex.sass +309 -0
  165. data/test/sass/templates/compressed.sass +15 -0
  166. data/test/sass/templates/expanded.sass +17 -0
  167. data/test/sass/templates/import.sass +11 -0
  168. data/test/sass/templates/importee.sass +19 -0
  169. data/test/sass/templates/line_numbers.sass +13 -0
  170. data/test/sass/templates/mixins.sass +76 -0
  171. data/test/sass/templates/multiline.sass +20 -0
  172. data/test/sass/templates/nested.sass +25 -0
  173. data/test/sass/templates/parent_ref.sass +25 -0
  174. data/test/sass/templates/script.sass +101 -0
  175. data/test/sass/templates/subdir/nested_subdir/_nested_partial.sass +2 -0
  176. data/test/sass/templates/subdir/nested_subdir/nested_subdir.sass +3 -0
  177. data/test/sass/templates/subdir/subdir.sass +6 -0
  178. data/test/sass/templates/units.sass +11 -0
  179. data/test/test_helper.rb +21 -0
  180. metadata +278 -0
@@ -0,0 +1,309 @@
1
+ body
2
+ :margin 0
3
+ :font 0.85em "Lucida Grande", "Trebuchet MS", Verdana, sans-serif
4
+ :color #fff
5
+ :background url(/images/global_bg.gif)
6
+
7
+ #page
8
+ :width 900px
9
+ :margin 0 auto
10
+ :background #440008
11
+ :border-top
12
+ :width 5px
13
+ :style solid
14
+ :color #ff8500
15
+
16
+ #header
17
+ :height 75px
18
+ :padding 0
19
+ h1
20
+ :float left
21
+ :width 274px
22
+ :height 75px
23
+ :margin 0
24
+ :background
25
+ :image url(/images/global_logo.gif)
26
+ /* Crazy nested comment
27
+ :repeat no-repeat
28
+ :text-indent -9999px
29
+ .status
30
+ :float right
31
+ :padding
32
+ :top .5em
33
+ :left .5em
34
+ :right .5em
35
+ :bottom 0
36
+ p
37
+ :float left
38
+ :margin
39
+ :top 0
40
+ :right 0.5em
41
+ :bottom 0
42
+ :left 0
43
+ ul
44
+ :float left
45
+ :margin 0
46
+ :padding 0
47
+ li
48
+ :list-style-type none
49
+ :display inline
50
+ :margin 0 5px
51
+ a:link, a:visited
52
+ :color #ff8500
53
+ :text-decoration none
54
+ a:hover
55
+ :text-decoration underline
56
+ .search
57
+ :float right
58
+ :clear right
59
+ :margin 12px 0 0 0
60
+ form
61
+ :margin 0
62
+ input
63
+ :margin 0 3px 0 0
64
+ :padding 2px
65
+ :border none
66
+
67
+ #menu
68
+ :clear both
69
+ :text-align right
70
+ :height 20px
71
+ :border-bottom 5px solid #006b95
72
+ :background #00a4e4
73
+ .contests
74
+ ul
75
+ :margin 0 5px 0 0
76
+ :padding 0
77
+ li
78
+ :list-style-type none
79
+ :margin 0 5px
80
+ :padding 5px 5px 0 5px
81
+ :display inline
82
+ :font-size 1.1em
83
+ // This comment is properly indented
84
+ :color #fff
85
+ :background #00a4e4
86
+ / This rule isn't a comment!
87
+ :red green
88
+ a:link, a:visited
89
+ :color #fff
90
+ :text-decoration none
91
+ :font-weight bold
92
+ a:hover
93
+ :text-decoration underline
94
+
95
+ //General content information
96
+ #content
97
+ :clear both
98
+ .container
99
+ :clear both
100
+ .column
101
+ :float left
102
+ .left
103
+ .middle
104
+ .right
105
+ :float right
106
+ a:link, a:visited
107
+ :color #93d700
108
+ :text-decoration none
109
+ a:hover
110
+ :text-decoration underline
111
+
112
+ // A hard tab:
113
+
114
+
115
+ #content
116
+ p, div
117
+ :width 40em
118
+ li, dt, dd
119
+ :color #ddffdd
120
+ :background-color #4792bb
121
+ .container.video
122
+ .column.left
123
+ :width 200px
124
+ .box
125
+ :margin-top 10px
126
+ p
127
+ :margin 0 1em auto 1em
128
+ .box.participants
129
+ img
130
+ :float left
131
+ :margin 0 1em auto 1em
132
+ :border 1px solid #6e000d
133
+ :style solid
134
+ h2
135
+ :margin 0 0 10px 0
136
+ :padding 0.5em
137
+ /* The background image is a gif!
138
+ :background #6e000d url(/images/hdr_participant.gif) 2px 2px no-repeat
139
+ /* Okay check this out
140
+ Multiline comments
141
+ Wow dude
142
+ I mean seriously, WOW
143
+ :text-indent -9999px
144
+ // And also...
145
+ Multiline comments that don't output!
146
+ Snazzy, no?
147
+ :border
148
+ :top
149
+ :width 5px
150
+ :style solid
151
+ :color #a20013
152
+ :right
153
+ :width 1px
154
+ :style dotted
155
+ .column.middle
156
+ :width 500px
157
+ .column.right
158
+ :width 200px
159
+ .box
160
+ :margin-top 0
161
+ p
162
+ :margin 0 1em auto 1em
163
+ .column
164
+ p
165
+ :margin-top 0
166
+
167
+ #content.contests
168
+ .container.information
169
+ .column.right
170
+ .box
171
+ :margin 1em 0
172
+ .box.videos
173
+ .thumbnail img
174
+ :width 200px
175
+ :height 150px
176
+ :margin-bottom 5px
177
+ a:link, a:visited
178
+ :color #93d700
179
+ :text-decoration none
180
+ a:hover
181
+ :text-decoration underline
182
+ .box.votes
183
+ a
184
+ :display block
185
+ :width 200px
186
+ :height 60px
187
+ :margin 15px 0
188
+ :background url(/images/btn_votenow.gif) no-repeat
189
+ :text-indent -9999px
190
+ :outline none
191
+ :border none
192
+ h2
193
+ :margin 52px 0 10px 0
194
+ :padding 0.5em
195
+ :background #6e000d url(/images/hdr_videostats.gif) 2px 2px no-repeat
196
+ :text-indent -9999px
197
+ :border-top 5px solid #a20013
198
+
199
+ #content.contests
200
+ .container.video
201
+ .box.videos
202
+ h2
203
+ :margin 0
204
+ :padding 0.5em
205
+ :background #6e000d url(/images/hdr_newestclips.gif) 2px 2px no-repeat
206
+ :text-indent -9999px
207
+ :border-top 5px solid #a20013
208
+ table
209
+ :width 100
210
+ td
211
+ :padding 1em
212
+ :width 25
213
+ :vertical-align top
214
+ p
215
+ :margin 0 0 5px 0
216
+ a:link, a:visited
217
+ :color #93d700
218
+ :text-decoration none
219
+ a:hover
220
+ :text-decoration underline
221
+ .thumbnail
222
+ :float left
223
+ img
224
+ :width 80px
225
+ :height 60px
226
+ :margin 0 10px 0 0
227
+ :border 1px solid #6e000d
228
+
229
+ #content
230
+ .container.comments
231
+ .column
232
+ :margin-top 15px
233
+ .column.left
234
+ :width 600px
235
+ .box
236
+ ol
237
+ :margin 0
238
+ :padding 0
239
+ li
240
+ :list-style-type none
241
+ :padding 10px
242
+ :margin 0 0 1em 0
243
+ :background #6e000d
244
+ :border-top 5px solid #a20013
245
+ div
246
+ :margin-bottom 1em
247
+ ul
248
+ :text-align right
249
+ li
250
+ :display inline
251
+ :border none
252
+ :padding 0
253
+ .column.right
254
+ :width 290px
255
+ :padding-left 10px
256
+ h2
257
+ :margin 0
258
+ :padding 0.5em
259
+ :background #6e000d url(/images/hdr_addcomment.gif) 2px 2px no-repeat
260
+ :text-indent -9999px
261
+ :border-top 5px solid #a20013
262
+ .box
263
+ textarea
264
+ :width 290px
265
+ :height 100px
266
+ :border none
267
+
268
+ #footer
269
+ :margin-top 10px
270
+ :padding 1.2em 1.5em
271
+ :background #ff8500
272
+ ul
273
+ :margin 0
274
+ :padding 0
275
+ :list-style-type none
276
+ li
277
+ :display inline
278
+ :margin 0 0.5em
279
+ :color #440008
280
+ ul.links
281
+ :float left
282
+ a:link, a:visited
283
+ :color #440008
284
+ :text-decoration none
285
+ a:hover
286
+ :text-decoration underline
287
+ ul.copyright
288
+ :float right
289
+
290
+
291
+ .clear
292
+ :clear both
293
+
294
+ .centered
295
+ :text-align center
296
+
297
+ img
298
+ :border none
299
+
300
+ button.short
301
+ :width 60px
302
+ :height 22px
303
+ :padding 0 0 2px 0
304
+ :color #fff
305
+ :border none
306
+ :background url(/images/btn_short.gif) no-repeat
307
+
308
+ table
309
+ :border-collapse collapse
@@ -0,0 +1,15 @@
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
@@ -0,0 +1,17 @@
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
@@ -0,0 +1,11 @@
1
+ !preconst = "hello"
2
+
3
+ =premixin
4
+ pre-mixin: here
5
+
6
+ @import importee, basic, basic.css, ../results/complex.css, partial
7
+
8
+ nonimported
9
+ :myconst = !preconst
10
+ :otherconst = !postconst
11
+ +postmixin
@@ -0,0 +1,19 @@
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
@@ -0,0 +1,13 @@
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
@@ -0,0 +1,76 @@
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
@@ -0,0 +1,20 @@
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
@@ -0,0 +1,25 @@
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
@@ -0,0 +1,25 @@
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
@@ -0,0 +1,101 @@
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
+ !concat = "#{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 (!concat "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"
98
+ :default = !str !important
99
+
100
+ #regression
101
+ :a= (3 + 2) - 1
@@ -0,0 +1,2 @@
1
+ #nested
2
+ :relative true
@@ -0,0 +1,3 @@
1
+ #pi
2
+ :width 314px
3
+
@@ -0,0 +1,6 @@
1
+ @import nested_subdir/nested_partial.sass
2
+
3
+ #subdir
4
+ :font
5
+ :size 20px
6
+ :weight bold
@@ -0,0 +1,11 @@
1
+ b
2
+ :foo= 0.5 * 10px
3
+ :bar= 10zzz * 12px / 5zzz
4
+ :baz= percentage(12.0px / 18px)
5
+ :many-units= 10.0zzz / 3yyy * 12px / 5zzz * 3yyy / 3px * 4em
6
+ :mm= 5mm + 1cm
7
+ :pc= 1pc + 12pt
8
+ :pt= 72pt - 2in
9
+ :inches= 1in + 2.54cm
10
+ :more-inches= 1in + ((72pt * 2in) + (36pt * 1in)) / 2.54cm
11
+ :mixed= (1 + (1em * 6px / 3in)) * 4in / 2em
@@ -0,0 +1,21 @@
1
+ lib_dir = File.dirname(__FILE__) + '/../lib'
2
+ require File.dirname(__FILE__) + '/linked_rails'
3
+
4
+ require 'test/unit'
5
+ $:.unshift lib_dir unless $:.include?(lib_dir)
6
+ require 'haml'
7
+ require 'sass'
8
+
9
+ # required because of Sass::Plugin
10
+ unless defined? RAILS_ROOT
11
+ RAILS_ROOT = '.'
12
+ MERB_ENV = RAILS_ENV = 'testing'
13
+ end
14
+
15
+ class Test::Unit::TestCase
16
+ def munge_filename(opts)
17
+ return if opts[:filename]
18
+ test_name = caller[1].gsub(/^.*`(?:\w+ )*(\w+)'.*$/, '\1')
19
+ opts[:filename] = "#{test_name}_inline.sass"
20
+ end
21
+ end