merbjedi-haml 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (177) hide show
  1. data/FAQ +138 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.rdoc +332 -0
  4. data/REVISION +1 -0
  5. data/Rakefile +184 -0
  6. data/VERSION +1 -0
  7. data/bin/css2sass +7 -0
  8. data/bin/haml +9 -0
  9. data/bin/html2haml +7 -0
  10. data/bin/sass +8 -0
  11. data/extra/haml-mode.el +434 -0
  12. data/extra/sass-mode.el +98 -0
  13. data/init.rb +8 -0
  14. data/lib/haml.rb +1025 -0
  15. data/lib/haml/buffer.rb +255 -0
  16. data/lib/haml/engine.rb +268 -0
  17. data/lib/haml/error.rb +22 -0
  18. data/lib/haml/exec.rb +395 -0
  19. data/lib/haml/filters.rb +276 -0
  20. data/lib/haml/helpers.rb +465 -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/html.rb +218 -0
  24. data/lib/haml/precompiler.rb +896 -0
  25. data/lib/haml/shared.rb +45 -0
  26. data/lib/haml/template.rb +51 -0
  27. data/lib/haml/template/patch.rb +58 -0
  28. data/lib/haml/template/plugin.rb +72 -0
  29. data/lib/haml/util.rb +77 -0
  30. data/lib/haml/version.rb +47 -0
  31. data/lib/sass.rb +1062 -0
  32. data/lib/sass/css.rb +388 -0
  33. data/lib/sass/engine.rb +501 -0
  34. data/lib/sass/environment.rb +33 -0
  35. data/lib/sass/error.rb +35 -0
  36. data/lib/sass/plugin.rb +203 -0
  37. data/lib/sass/plugin/merb.rb +56 -0
  38. data/lib/sass/plugin/rails.rb +24 -0
  39. data/lib/sass/repl.rb +44 -0
  40. data/lib/sass/script.rb +38 -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 +28 -0
  44. data/lib/sass/script/functions.rb +122 -0
  45. data/lib/sass/script/lexer.rb +144 -0
  46. data/lib/sass/script/literal.rb +60 -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 +42 -0
  51. data/lib/sass/script/unary_operation.rb +21 -0
  52. data/lib/sass/script/variable.rb +20 -0
  53. data/lib/sass/tree/attr_node.rb +64 -0
  54. data/lib/sass/tree/comment_node.rb +30 -0
  55. data/lib/sass/tree/debug_node.rb +22 -0
  56. data/lib/sass/tree/directive_node.rb +50 -0
  57. data/lib/sass/tree/file_node.rb +27 -0
  58. data/lib/sass/tree/for_node.rb +29 -0
  59. data/lib/sass/tree/if_node.rb +27 -0
  60. data/lib/sass/tree/mixin_def_node.rb +18 -0
  61. data/lib/sass/tree/mixin_node.rb +34 -0
  62. data/lib/sass/tree/node.rb +97 -0
  63. data/lib/sass/tree/rule_node.rb +120 -0
  64. data/lib/sass/tree/variable_node.rb +24 -0
  65. data/lib/sass/tree/while_node.rb +20 -0
  66. data/rails/init.rb +1 -0
  67. data/test/benchmark.rb +99 -0
  68. data/test/haml/engine_test.rb +852 -0
  69. data/test/haml/helper_test.rb +224 -0
  70. data/test/haml/html2haml_test.rb +92 -0
  71. data/test/haml/markaby/standard.mab +52 -0
  72. data/test/haml/mocks/article.rb +6 -0
  73. data/test/haml/results/content_for_layout.xhtml +15 -0
  74. data/test/haml/results/eval_suppressed.xhtml +9 -0
  75. data/test/haml/results/filters.xhtml +62 -0
  76. data/test/haml/results/helpers.xhtml +93 -0
  77. data/test/haml/results/helpful.xhtml +10 -0
  78. data/test/haml/results/just_stuff.xhtml +68 -0
  79. data/test/haml/results/list.xhtml +12 -0
  80. data/test/haml/results/nuke_inner_whitespace.xhtml +40 -0
  81. data/test/haml/results/nuke_outer_whitespace.xhtml +148 -0
  82. data/test/haml/results/original_engine.xhtml +20 -0
  83. data/test/haml/results/partial_layout.xhtml +5 -0
  84. data/test/haml/results/partials.xhtml +21 -0
  85. data/test/haml/results/render_layout.xhtml +3 -0
  86. data/test/haml/results/silent_script.xhtml +74 -0
  87. data/test/haml/results/standard.xhtml +42 -0
  88. data/test/haml/results/tag_parsing.xhtml +23 -0
  89. data/test/haml/results/very_basic.xhtml +5 -0
  90. data/test/haml/results/whitespace_handling.xhtml +89 -0
  91. data/test/haml/rhtml/_av_partial_1.rhtml +12 -0
  92. data/test/haml/rhtml/_av_partial_2.rhtml +8 -0
  93. data/test/haml/rhtml/action_view.rhtml +62 -0
  94. data/test/haml/rhtml/standard.rhtml +54 -0
  95. data/test/haml/template_test.rb +204 -0
  96. data/test/haml/templates/_av_partial_1.haml +9 -0
  97. data/test/haml/templates/_av_partial_1_ugly.haml +9 -0
  98. data/test/haml/templates/_av_partial_2.haml +5 -0
  99. data/test/haml/templates/_av_partial_2_ugly.haml +5 -0
  100. data/test/haml/templates/_layout.erb +3 -0
  101. data/test/haml/templates/_layout_for_partial.haml +3 -0
  102. data/test/haml/templates/_partial.haml +8 -0
  103. data/test/haml/templates/_text_area.haml +3 -0
  104. data/test/haml/templates/action_view.haml +47 -0
  105. data/test/haml/templates/action_view_ugly.haml +47 -0
  106. data/test/haml/templates/breakage.haml +8 -0
  107. data/test/haml/templates/content_for_layout.haml +10 -0
  108. data/test/haml/templates/eval_suppressed.haml +11 -0
  109. data/test/haml/templates/filters.haml +66 -0
  110. data/test/haml/templates/helpers.haml +95 -0
  111. data/test/haml/templates/helpful.haml +11 -0
  112. data/test/haml/templates/just_stuff.haml +83 -0
  113. data/test/haml/templates/list.haml +12 -0
  114. data/test/haml/templates/nuke_inner_whitespace.haml +32 -0
  115. data/test/haml/templates/nuke_outer_whitespace.haml +144 -0
  116. data/test/haml/templates/original_engine.haml +17 -0
  117. data/test/haml/templates/partial_layout.haml +3 -0
  118. data/test/haml/templates/partialize.haml +1 -0
  119. data/test/haml/templates/partials.haml +12 -0
  120. data/test/haml/templates/render_layout.haml +2 -0
  121. data/test/haml/templates/silent_script.haml +40 -0
  122. data/test/haml/templates/standard.haml +42 -0
  123. data/test/haml/templates/standard_ugly.haml +42 -0
  124. data/test/haml/templates/tag_parsing.haml +21 -0
  125. data/test/haml/templates/very_basic.haml +4 -0
  126. data/test/haml/templates/whitespace_handling.haml +87 -0
  127. data/test/linked_rails.rb +12 -0
  128. data/test/sass/css2sass_test.rb +193 -0
  129. data/test/sass/engine_test.rb +752 -0
  130. data/test/sass/functions_test.rb +96 -0
  131. data/test/sass/more_results/more1.css +9 -0
  132. data/test/sass/more_results/more1_with_line_comments.css +26 -0
  133. data/test/sass/more_results/more_import.css +29 -0
  134. data/test/sass/more_templates/_more_partial.sass +2 -0
  135. data/test/sass/more_templates/more1.sass +23 -0
  136. data/test/sass/more_templates/more_import.sass +11 -0
  137. data/test/sass/plugin_test.rb +208 -0
  138. data/test/sass/results/alt.css +4 -0
  139. data/test/sass/results/basic.css +9 -0
  140. data/test/sass/results/compact.css +5 -0
  141. data/test/sass/results/complex.css +87 -0
  142. data/test/sass/results/compressed.css +1 -0
  143. data/test/sass/results/expanded.css +19 -0
  144. data/test/sass/results/import.css +29 -0
  145. data/test/sass/results/line_numbers.css +49 -0
  146. data/test/sass/results/mixins.css +95 -0
  147. data/test/sass/results/multiline.css +24 -0
  148. data/test/sass/results/nested.css +22 -0
  149. data/test/sass/results/parent_ref.css +13 -0
  150. data/test/sass/results/script.css +16 -0
  151. data/test/sass/results/subdir/nested_subdir/nested_subdir.css +1 -0
  152. data/test/sass/results/subdir/subdir.css +3 -0
  153. data/test/sass/results/units.css +11 -0
  154. data/test/sass/script_test.rb +152 -0
  155. data/test/sass/templates/_partial.sass +2 -0
  156. data/test/sass/templates/alt.sass +16 -0
  157. data/test/sass/templates/basic.sass +23 -0
  158. data/test/sass/templates/bork.sass +2 -0
  159. data/test/sass/templates/bork2.sass +2 -0
  160. data/test/sass/templates/compact.sass +17 -0
  161. data/test/sass/templates/complex.sass +309 -0
  162. data/test/sass/templates/compressed.sass +15 -0
  163. data/test/sass/templates/expanded.sass +17 -0
  164. data/test/sass/templates/import.sass +11 -0
  165. data/test/sass/templates/importee.sass +19 -0
  166. data/test/sass/templates/line_numbers.sass +13 -0
  167. data/test/sass/templates/mixins.sass +76 -0
  168. data/test/sass/templates/multiline.sass +20 -0
  169. data/test/sass/templates/nested.sass +25 -0
  170. data/test/sass/templates/parent_ref.sass +25 -0
  171. data/test/sass/templates/script.sass +101 -0
  172. data/test/sass/templates/subdir/nested_subdir/_nested_partial.sass +2 -0
  173. data/test/sass/templates/subdir/nested_subdir/nested_subdir.sass +3 -0
  174. data/test/sass/templates/subdir/subdir.sass +6 -0
  175. data/test/sass/templates/units.sass +11 -0
  176. data/test/test_helper.rb +21 -0
  177. metadata +273 -0
@@ -0,0 +1,2 @@
1
+ #foo
2
+ :background-color #baf
@@ -0,0 +1,16 @@
1
+ h1
2
+ :float left
3
+ :width 274px
4
+ height: 75px
5
+ margin: 0
6
+ background:
7
+ repeat: no-repeat
8
+ :image none
9
+ a:hover, a:visited
10
+ color: green
11
+ b:hover
12
+ color: red
13
+ :background-color green
14
+ const
15
+ nosp= 1 + 2
16
+ sp = 1 + 2
@@ -0,0 +1,23 @@
1
+
2
+
3
+ body
4
+ :font Arial
5
+ :background blue
6
+
7
+ #page
8
+ :width 700px
9
+ :height 100
10
+ #header
11
+ :height 300px
12
+ h1
13
+ :font-size 50px
14
+ :color blue
15
+
16
+ #content.user.show
17
+ #container.top
18
+ #column.left
19
+ :width 100px
20
+ #column.right
21
+ :width 600px
22
+ #container.bottom
23
+ :background brown
@@ -0,0 +1,2 @@
1
+ bork
2
+ :bork= !bork
@@ -0,0 +1,2 @@
1
+ bork
2
+ :bork: bork;
@@ -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,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