compass 0.8.16

Sign up to get free protection for your applications and to get access to all the features.
Files changed (275) hide show
  1. data/CHANGELOG.markdown +551 -0
  2. data/LICENSE.markdown +29 -0
  3. data/README.markdown +44 -0
  4. data/REVISION +1 -0
  5. data/Rakefile +127 -0
  6. data/VERSION.yml +4 -0
  7. data/bin/compass +8 -0
  8. data/deps.rip +1 -0
  9. data/examples/README.markdown +4 -0
  10. data/examples/blueprint_default/config.rb +7 -0
  11. data/examples/blueprint_default/images/grid.png +0 -0
  12. data/examples/blueprint_default/index.html.haml +85 -0
  13. data/examples/blueprint_default/parts/elements.html.haml +282 -0
  14. data/examples/blueprint_default/parts/forms.html.haml +190 -0
  15. data/examples/blueprint_default/parts/grid.html.haml +274 -0
  16. data/examples/blueprint_default/parts/test-small.jpg +0 -0
  17. data/examples/blueprint_default/parts/test.jpg +0 -0
  18. data/examples/blueprint_default/parts/valid.png +0 -0
  19. data/examples/blueprint_default/src/ie.sass +3 -0
  20. data/examples/blueprint_default/src/images/grid.png +0 -0
  21. data/examples/blueprint_default/src/print.sass +3 -0
  22. data/examples/blueprint_default/src/screen.sass +8 -0
  23. data/examples/blueprint_plugins/config.rb +8 -0
  24. data/examples/blueprint_plugins/images/buttons/cross.png +0 -0
  25. data/examples/blueprint_plugins/images/buttons/key.png +0 -0
  26. data/examples/blueprint_plugins/images/buttons/tick.png +0 -0
  27. data/examples/blueprint_plugins/images/grid.png +0 -0
  28. data/examples/blueprint_plugins/images/link_icons/doc.png +0 -0
  29. data/examples/blueprint_plugins/images/link_icons/email.png +0 -0
  30. data/examples/blueprint_plugins/images/link_icons/external.png +0 -0
  31. data/examples/blueprint_plugins/images/link_icons/feed.png +0 -0
  32. data/examples/blueprint_plugins/images/link_icons/im.png +0 -0
  33. data/examples/blueprint_plugins/images/link_icons/pdf.png +0 -0
  34. data/examples/blueprint_plugins/images/link_icons/visited.png +0 -0
  35. data/examples/blueprint_plugins/images/link_icons/xls.png +0 -0
  36. data/examples/blueprint_plugins/images/test-small.jpg +0 -0
  37. data/examples/blueprint_plugins/images/test.jpg +0 -0
  38. data/examples/blueprint_plugins/images/valid.png +0 -0
  39. data/examples/blueprint_plugins/index.html.haml +96 -0
  40. data/examples/blueprint_plugins/plugins/buttons.html.haml +67 -0
  41. data/examples/blueprint_plugins/plugins/fancy_type.html.haml +100 -0
  42. data/examples/blueprint_plugins/plugins/link_icons.html.haml +61 -0
  43. data/examples/blueprint_plugins/plugins/rtl.html.haml +100 -0
  44. data/examples/blueprint_plugins/src/buttons.sass +49 -0
  45. data/examples/blueprint_plugins/src/ie.sass +3 -0
  46. data/examples/blueprint_plugins/src/images/grid.png +0 -0
  47. data/examples/blueprint_plugins/src/link_icons.sass +13 -0
  48. data/examples/blueprint_plugins/src/print.sass +3 -0
  49. data/examples/blueprint_plugins/src/rtl_screen.sass +13 -0
  50. data/examples/blueprint_plugins/src/screen.sass +11 -0
  51. data/examples/blueprint_scoped/images/grid.png +0 -0
  52. data/examples/blueprint_scoped/src/ie.sass +3 -0
  53. data/examples/blueprint_scoped/src/print.sass +3 -0
  54. data/examples/blueprint_scoped/src/screen.sass +4 -0
  55. data/examples/blueprint_scoped_form/images/grid.png +0 -0
  56. data/examples/blueprint_scoped_form/src/ie.sass +3 -0
  57. data/examples/blueprint_scoped_form/src/print.sass +3 -0
  58. data/examples/blueprint_scoped_form/src/screen.sass +10 -0
  59. data/examples/blueprint_semantic/config.rb +7 -0
  60. data/examples/blueprint_semantic/images/grid.png +0 -0
  61. data/examples/blueprint_semantic/index.html.haml +86 -0
  62. data/examples/blueprint_semantic/parts/fancy_type.html.haml +100 -0
  63. data/examples/blueprint_semantic/parts/liquid.html.haml +100 -0
  64. data/examples/blueprint_semantic/parts/test-small.jpg +0 -0
  65. data/examples/blueprint_semantic/parts/test.jpg +0 -0
  66. data/examples/blueprint_semantic/parts/valid.png +0 -0
  67. data/examples/blueprint_semantic/src/ie.sass +3 -0
  68. data/examples/blueprint_semantic/src/images/grid.png +0 -0
  69. data/examples/blueprint_semantic/src/liquid.sass +70 -0
  70. data/examples/blueprint_semantic/src/print.sass +3 -0
  71. data/examples/blueprint_semantic/src/screen.sass +71 -0
  72. data/examples/compass/compass.html.haml +39 -0
  73. data/examples/compass/config.rb +7 -0
  74. data/examples/compass/images/blue_arrow.gif +0 -0
  75. data/examples/compass/src/compass.sass +47 -0
  76. data/examples/compass/src/images/blue_arrow.gif +0 -0
  77. data/examples/compass/src/sticky_footer.sass +11 -0
  78. data/examples/compass/src/utilities.sass +108 -0
  79. data/examples/compass/sticky_footer.html.haml +14 -0
  80. data/examples/compass/utilities.html.haml +189 -0
  81. data/examples/logo/logo.html.haml +40 -0
  82. data/examples/logo/src/ie.sass +6 -0
  83. data/examples/logo/src/print.sass +6 -0
  84. data/examples/logo/src/screen.sass +29 -0
  85. data/examples/yui/divisions.html.haml +179 -0
  86. data/examples/yui/index.html.haml +19 -0
  87. data/examples/yui/src/screen.sass +13 -0
  88. data/examples/yui/sub_divisions.html.haml +169 -0
  89. data/examples/yui/templates.html.haml +54 -0
  90. data/examples/yui/test.jpg +0 -0
  91. data/examples/yui/typography.html.haml +132 -0
  92. data/frameworks/blueprint.rb +2 -0
  93. data/frameworks/blueprint/stylesheets/_blueprint.sass +3 -0
  94. data/frameworks/blueprint/stylesheets/blueprint/_ie.sass +93 -0
  95. data/frameworks/blueprint/stylesheets/blueprint/_print.sass +83 -0
  96. data/frameworks/blueprint/stylesheets/blueprint/_reset.sass +3 -0
  97. data/frameworks/blueprint/stylesheets/blueprint/_screen.sass +15 -0
  98. data/frameworks/blueprint/stylesheets/blueprint/modules/_buttons.sass +84 -0
  99. data/frameworks/blueprint/stylesheets/blueprint/modules/_colors.sass +33 -0
  100. data/frameworks/blueprint/stylesheets/blueprint/modules/_debug.sass +9 -0
  101. data/frameworks/blueprint/stylesheets/blueprint/modules/_fancy_type.sass +82 -0
  102. data/frameworks/blueprint/stylesheets/blueprint/modules/_form.sass +55 -0
  103. data/frameworks/blueprint/stylesheets/blueprint/modules/_grid.sass +178 -0
  104. data/frameworks/blueprint/stylesheets/blueprint/modules/_interaction.sass +58 -0
  105. data/frameworks/blueprint/stylesheets/blueprint/modules/_link_icons.sass +44 -0
  106. data/frameworks/blueprint/stylesheets/blueprint/modules/_liquid.sass +141 -0
  107. data/frameworks/blueprint/stylesheets/blueprint/modules/_reset.sass +56 -0
  108. data/frameworks/blueprint/stylesheets/blueprint/modules/_rtl.sass +104 -0
  109. data/frameworks/blueprint/stylesheets/blueprint/modules/_scaffolding.sass +47 -0
  110. data/frameworks/blueprint/stylesheets/blueprint/modules/_typography.sass +155 -0
  111. data/frameworks/blueprint/stylesheets/blueprint/modules/_utilities.sass +37 -0
  112. data/frameworks/blueprint/templates/buttons/buttons.sass +49 -0
  113. data/frameworks/blueprint/templates/buttons/buttons/cross.png +0 -0
  114. data/frameworks/blueprint/templates/buttons/buttons/key.png +0 -0
  115. data/frameworks/blueprint/templates/buttons/buttons/tick.png +0 -0
  116. data/frameworks/blueprint/templates/buttons/manifest.rb +5 -0
  117. data/frameworks/blueprint/templates/link_icons/link_icons.sass +13 -0
  118. data/frameworks/blueprint/templates/link_icons/link_icons/doc.png +0 -0
  119. data/frameworks/blueprint/templates/link_icons/link_icons/email.png +0 -0
  120. data/frameworks/blueprint/templates/link_icons/link_icons/external.png +0 -0
  121. data/frameworks/blueprint/templates/link_icons/link_icons/feed.png +0 -0
  122. data/frameworks/blueprint/templates/link_icons/link_icons/im.png +0 -0
  123. data/frameworks/blueprint/templates/link_icons/link_icons/pdf.png +0 -0
  124. data/frameworks/blueprint/templates/link_icons/link_icons/visited.png +0 -0
  125. data/frameworks/blueprint/templates/link_icons/link_icons/xls.png +0 -0
  126. data/frameworks/blueprint/templates/link_icons/manifest.rb +10 -0
  127. data/frameworks/blueprint/templates/project/grid.png +0 -0
  128. data/frameworks/blueprint/templates/project/ie.sass +15 -0
  129. data/frameworks/blueprint/templates/project/manifest.rb +6 -0
  130. data/frameworks/blueprint/templates/project/partials/_base.sass +11 -0
  131. data/frameworks/blueprint/templates/project/print.sass +3 -0
  132. data/frameworks/blueprint/templates/project/screen.sass +40 -0
  133. data/frameworks/compass.rb +2 -0
  134. data/frameworks/compass/stylesheets/_compass.sass +1 -0
  135. data/frameworks/compass/stylesheets/compass/_layout.sass +1 -0
  136. data/frameworks/compass/stylesheets/compass/_misc.sass +24 -0
  137. data/frameworks/compass/stylesheets/compass/_reset.sass +3 -0
  138. data/frameworks/compass/stylesheets/compass/_utilities.sass +6 -0
  139. data/frameworks/compass/stylesheets/compass/layout/_sticky_footer.sass +17 -0
  140. data/frameworks/compass/stylesheets/compass/utilities/_general.sass +6 -0
  141. data/frameworks/compass/stylesheets/compass/utilities/_links.sass +3 -0
  142. data/frameworks/compass/stylesheets/compass/utilities/_lists.sass +3 -0
  143. data/frameworks/compass/stylesheets/compass/utilities/_print.sass +24 -0
  144. data/frameworks/compass/stylesheets/compass/utilities/_sprites.sass +1 -0
  145. data/frameworks/compass/stylesheets/compass/utilities/_tables.sass +3 -0
  146. data/frameworks/compass/stylesheets/compass/utilities/_text.sass +2 -0
  147. data/frameworks/compass/stylesheets/compass/utilities/general/_clearfix.sass +24 -0
  148. data/frameworks/compass/stylesheets/compass/utilities/general/_float.sass +17 -0
  149. data/frameworks/compass/stylesheets/compass/utilities/general/_hacks.sass +6 -0
  150. data/frameworks/compass/stylesheets/compass/utilities/general/_inline_block.sass +6 -0
  151. data/frameworks/compass/stylesheets/compass/utilities/general/_reset.sass +134 -0
  152. data/frameworks/compass/stylesheets/compass/utilities/general/_tabs.sass +0 -0
  153. data/frameworks/compass/stylesheets/compass/utilities/general/_tag_cloud.sass +19 -0
  154. data/frameworks/compass/stylesheets/compass/utilities/links/_hover_link.sass +5 -0
  155. data/frameworks/compass/stylesheets/compass/utilities/links/_link_colors.sass +24 -0
  156. data/frameworks/compass/stylesheets/compass/utilities/links/_unstyled_link.sass +5 -0
  157. data/frameworks/compass/stylesheets/compass/utilities/lists/_bullets.sass +21 -0
  158. data/frameworks/compass/stylesheets/compass/utilities/lists/_horizontal_list.sass +52 -0
  159. data/frameworks/compass/stylesheets/compass/utilities/lists/_inline_list.sass +29 -0
  160. data/frameworks/compass/stylesheets/compass/utilities/sprites/_sprite_img.sass +12 -0
  161. data/frameworks/compass/stylesheets/compass/utilities/tables/_alternating_rows_and_columns.sass +20 -0
  162. data/frameworks/compass/stylesheets/compass/utilities/tables/_borders.sass +27 -0
  163. data/frameworks/compass/stylesheets/compass/utilities/tables/_scaffolding.sass +9 -0
  164. data/frameworks/compass/stylesheets/compass/utilities/text/_ellipsis.sass +13 -0
  165. data/frameworks/compass/stylesheets/compass/utilities/text/_nowrap.sass +3 -0
  166. data/frameworks/compass/stylesheets/compass/utilities/text/_replacement.sass +17 -0
  167. data/frameworks/compass/templates/ellipsis/ellipsis.sass +6 -0
  168. data/frameworks/compass/templates/ellipsis/manifest.rb +2 -0
  169. data/frameworks/compass/templates/ellipsis/xml/ellipsis.xml +14 -0
  170. data/frameworks/compass/templates/project/ie.sass +6 -0
  171. data/frameworks/compass/templates/project/manifest.rb +3 -0
  172. data/frameworks/compass/templates/project/print.sass +6 -0
  173. data/frameworks/compass/templates/project/screen.sass +13 -0
  174. data/frameworks/yui.rb +2 -0
  175. data/frameworks/yui/stylesheets/_yui.sass +7 -0
  176. data/frameworks/yui/stylesheets/yui/modules/_base.sass +60 -0
  177. data/frameworks/yui/stylesheets/yui/modules/_fonts.sass +38 -0
  178. data/frameworks/yui/stylesheets/yui/modules/_grids.sass +341 -0
  179. data/frameworks/yui/stylesheets/yui/modules/_reset.sass +61 -0
  180. data/frameworks/yui/templates/project/manifest.rb +1 -0
  181. data/frameworks/yui/templates/project/screen.sass +4 -0
  182. data/lib/compass.rb +23 -0
  183. data/lib/compass/actions.rb +110 -0
  184. data/lib/compass/app_integration.rb +5 -0
  185. data/lib/compass/app_integration/merb.rb +43 -0
  186. data/lib/compass/app_integration/rails.rb +12 -0
  187. data/lib/compass/app_integration/rails/action_controller.rb +15 -0
  188. data/lib/compass/app_integration/rails/sass_plugin.rb +5 -0
  189. data/lib/compass/app_integration/rails/templates/compass-install-rails.rb +80 -0
  190. data/lib/compass/app_integration/rails/urls.rb +14 -0
  191. data/lib/compass/commands/base.rb +33 -0
  192. data/lib/compass/commands/create_project.rb +19 -0
  193. data/lib/compass/commands/generate_grid_background.rb +24 -0
  194. data/lib/compass/commands/installer_command.rb +31 -0
  195. data/lib/compass/commands/list_frameworks.rb +16 -0
  196. data/lib/compass/commands/print_version.rb +23 -0
  197. data/lib/compass/commands/project_base.rb +112 -0
  198. data/lib/compass/commands/stamp_pattern.rb +33 -0
  199. data/lib/compass/commands/update_project.rb +34 -0
  200. data/lib/compass/commands/validate_project.rb +21 -0
  201. data/lib/compass/commands/watch_project.rb +64 -0
  202. data/lib/compass/commands/write_configuration.rb +28 -0
  203. data/lib/compass/compiler.rb +54 -0
  204. data/lib/compass/configuration.rb +324 -0
  205. data/lib/compass/core_ext.rb +14 -0
  206. data/lib/compass/dependencies.rb +10 -0
  207. data/lib/compass/errors.rb +7 -0
  208. data/lib/compass/exec.rb +251 -0
  209. data/lib/compass/frameworks.rb +29 -0
  210. data/lib/compass/grid_builder.rb +72 -0
  211. data/lib/compass/installers.rb +5 -0
  212. data/lib/compass/installers/base.rb +158 -0
  213. data/lib/compass/installers/manifest.rb +58 -0
  214. data/lib/compass/installers/rails.rb +135 -0
  215. data/lib/compass/installers/stand_alone.rb +60 -0
  216. data/lib/compass/logger.rb +42 -0
  217. data/lib/compass/sass_extensions.rb +5 -0
  218. data/lib/compass/sass_extensions/functions.rb +19 -0
  219. data/lib/compass/sass_extensions/functions/display.rb +22 -0
  220. data/lib/compass/sass_extensions/functions/enumerate.rb +6 -0
  221. data/lib/compass/sass_extensions/functions/inline_image.rb +35 -0
  222. data/lib/compass/sass_extensions/functions/selectors.rb +39 -0
  223. data/lib/compass/sass_extensions/functions/urls.rb +105 -0
  224. data/lib/compass/sass_extensions/monkey_patches.rb +3 -0
  225. data/lib/compass/sass_extensions/monkey_patches/stylesheet_updating.rb +23 -0
  226. data/lib/compass/test_case.rb +38 -0
  227. data/lib/compass/validator.rb +10 -0
  228. data/lib/compass/version.rb +57 -0
  229. data/lib/vendor/fssm.rb +41 -0
  230. data/lib/vendor/fssm/backends/fsevents.rb +37 -0
  231. data/lib/vendor/fssm/backends/polling.rb +26 -0
  232. data/lib/vendor/fssm/cache.rb +193 -0
  233. data/lib/vendor/fssm/ext.rb +37 -0
  234. data/lib/vendor/fssm/fsevents.rb +129 -0
  235. data/lib/vendor/fssm/monitor.rb +25 -0
  236. data/lib/vendor/fssm/path.rb +91 -0
  237. data/lib/vendor/fssm/state.rb +54 -0
  238. data/lib/vendor/fssm/support.rb +22 -0
  239. data/lib/vendor/fssm/tree.rb +176 -0
  240. data/test/command_line_helper.rb +102 -0
  241. data/test/command_line_test.rb +66 -0
  242. data/test/compass_test.rb +141 -0
  243. data/test/configuration_test.rb +118 -0
  244. data/test/fixtures/stylesheets/blueprint/config.rb +9 -0
  245. data/test/fixtures/stylesheets/blueprint/css/typography.css +158 -0
  246. data/test/fixtures/stylesheets/blueprint/images/grid.png +0 -0
  247. data/test/fixtures/stylesheets/blueprint/sass/ie.sass +3 -0
  248. data/test/fixtures/stylesheets/blueprint/sass/print.sass +3 -0
  249. data/test/fixtures/stylesheets/blueprint/sass/screen.sass +17 -0
  250. data/test/fixtures/stylesheets/blueprint/sass/typography.sass +3 -0
  251. data/test/fixtures/stylesheets/compass/config.rb +9 -0
  252. data/test/fixtures/stylesheets/compass/css/layout.css +13 -0
  253. data/test/fixtures/stylesheets/compass/css/print.css +18 -0
  254. data/test/fixtures/stylesheets/compass/css/reset.css +60 -0
  255. data/test/fixtures/stylesheets/compass/css/utilities.css +17 -0
  256. data/test/fixtures/stylesheets/compass/sass/layout.sass +3 -0
  257. data/test/fixtures/stylesheets/compass/sass/print.sass +5 -0
  258. data/test/fixtures/stylesheets/compass/sass/reset.sass +10 -0
  259. data/test/fixtures/stylesheets/compass/sass/utilities.sass +6 -0
  260. data/test/fixtures/stylesheets/image_urls/config.rb +17 -0
  261. data/test/fixtures/stylesheets/image_urls/css/screen.css +3 -0
  262. data/test/fixtures/stylesheets/image_urls/images/grid.png +0 -0
  263. data/test/fixtures/stylesheets/image_urls/sass/screen.sass +6 -0
  264. data/test/fixtures/stylesheets/yui/config.rb +9 -0
  265. data/test/fixtures/stylesheets/yui/css/mixins.css +13 -0
  266. data/test/fixtures/stylesheets/yui/sass/base.sass +3 -0
  267. data/test/fixtures/stylesheets/yui/sass/fonts.sass +3 -0
  268. data/test/fixtures/stylesheets/yui/sass/grids.sass +3 -0
  269. data/test/fixtures/stylesheets/yui/sass/mixins.sass +16 -0
  270. data/test/rails_integration_test.rb +83 -0
  271. data/test/sass_extensions_test.rb +31 -0
  272. data/test/test_case_helper.rb +13 -0
  273. data/test/test_helper.rb +21 -0
  274. data/test/test_rails_helper.rb +20 -0
  275. metadata +372 -0
@@ -0,0 +1,3 @@
1
+ @import blueprint/ie
2
+
3
+ +blueprint-ie
@@ -0,0 +1,3 @@
1
+ @import blueprint/print
2
+
3
+ +blueprint-print
@@ -0,0 +1,17 @@
1
+ @import blueprint/screen
2
+ @import compass/reset
3
+
4
+ +blueprint
5
+ #main.container
6
+ #top
7
+ +column(24, true)
8
+ #middle
9
+ +column(24, true)
10
+ #left
11
+ +column(6)
12
+ #content
13
+ +column(12)
14
+ #right
15
+ +column(6, true)
16
+ #bottom
17
+ +column(24, true)
@@ -0,0 +1,3 @@
1
+ @import blueprint/modules/typography.sass
2
+
3
+ +blueprint-typography
@@ -0,0 +1,9 @@
1
+ # Require any additional compass plugins here.
2
+ project_type = :stand_alone
3
+ css_dir = "tmp"
4
+ sass_dir = "sass"
5
+ images_dir = "images"
6
+ output_style = :nested
7
+ # To enable relative image paths using the images_url() function:
8
+ # http_images_path = :relative
9
+ http_images_path = "/images"
@@ -0,0 +1,13 @@
1
+ html, body {
2
+ height: 100%; }
3
+
4
+ #layout {
5
+ min-height: 100%;
6
+ margin-bottom: -72px; }
7
+ #layout #layout_footer {
8
+ height: 72px; }
9
+
10
+ #footer {
11
+ clear: both;
12
+ position: relative;
13
+ height: 72px; }
@@ -0,0 +1,18 @@
1
+ .noprint,
2
+ .no-print {
3
+ display: none; }
4
+
5
+ address.print-only, blockquote.print-only, center.print-only, dir.print-only, div.print-only, dd.print-only, dl.print-only, dt.print-only,
6
+ fieldset.print-only, form.print-only, frameset.print-only, h1.print-only, h2.print-only, h3.print-only, h4.print-only, h5.print-only, h6.print-only, hr.print-only,
7
+ isindex.print-only, li.print-only, menu.print-only, noframes.print-only, noscript.print-only, ol.print-only, p.print-only, pre.print-only,
8
+ table.print-only, tbody.print-only, td.print-only, tfoot.print-only, th.print-only, thead.print-only, tr.print-only, ul.print-only {
9
+ display: block; }
10
+
11
+ a.print-only, abbr.print-only, acronym.print-only, b.print-only, basefont.print-only, bdo.print-only, big.print-only, br.print-only, cite.print-only,
12
+ code.print-only, dfn.print-only, em.print-only, font.print-only, i.print-only, img.print-only, input.print-only, kbd.print-only, label.print-only, q.print-only, s.print-only,
13
+ samp.print-only, select.print-only, small.print-only, span.print-only, strike.print-only, strong.print-only, sub.print-only, sup.print-only,
14
+ textarea.print-only, tt.print-only, u.print-only, var.print-only {
15
+ display: inline; }
16
+
17
+ .print-only {
18
+ display: none; }
@@ -0,0 +1,60 @@
1
+ html, body, div, span, applet, object, iframe,
2
+ h1, h2, h3, h4, h5, h6, p, blockquote, pre,
3
+ a, abbr, acronym, address, big, cite, code,
4
+ del, dfn, em, font, img, ins, kbd, q, s, samp,
5
+ small, strike, strong, sub, sup, tt, var,
6
+ dl, dt, dd, ol, ul, li,
7
+ fieldset, form, label, legend,
8
+ table, caption, tbody, tfoot, thead, tr, th, td {
9
+ margin: 0;
10
+ padding: 0;
11
+ border: 0;
12
+ outline: 0;
13
+ font-weight: inherit;
14
+ font-style: inherit;
15
+ font-size: 100%;
16
+ font-family: inherit;
17
+ vertical-align: baseline; }
18
+
19
+ *:focus {
20
+ outline: 0; }
21
+
22
+ body {
23
+ line-height: 1em;
24
+ color: black;
25
+ background: #fff; }
26
+
27
+ ol, ul {
28
+ list-style: none; }
29
+
30
+ /* tables still need 'cellspacing="0"' in the markup */
31
+ table {
32
+ border-collapse: separate;
33
+ border-spacing: 0;
34
+ vertical-align: middle; }
35
+
36
+ caption, th, td {
37
+ text-align: left;
38
+ font-weight: normal;
39
+ vertical-align: middle; }
40
+
41
+ q, blockquote {
42
+ quotes: "" ""; }
43
+ q:before, q:after, blockquote:before, blockquote:after {
44
+ content: ""; }
45
+
46
+ img a {
47
+ border: none; }
48
+
49
+ .unregistered-only, .registered-only {
50
+ display: none; }
51
+
52
+ body.registered a.registered-only, body.registered abbr.registered-only, body.registered acronym.registered-only, body.registered b.registered-only, body.registered basefont.registered-only, body.registered bdo.registered-only, body.registered big.registered-only, body.registered br.registered-only, body.registered cite.registered-only, body.registered code.registered-only, body.registered dfn.registered-only, body.registered em.registered-only, body.registered font.registered-only, body.registered i.registered-only, body.registered img.registered-only, body.registered input.registered-only, body.registered kbd.registered-only, body.registered label.registered-only, body.registered q.registered-only, body.registered s.registered-only, body.registered samp.registered-only, body.registered select.registered-only, body.registered small.registered-only, body.registered span.registered-only, body.registered strike.registered-only, body.registered strong.registered-only, body.registered sub.registered-only, body.registered sup.registered-only, body.registered textarea.registered-only, body.registered tt.registered-only, body.registered u.registered-only, body.registered var.registered-only {
53
+ display: inline; }
54
+ body.registered address.registered-only, body.registered blockquote.registered-only, body.registered center.registered-only, body.registered dir.registered-only, body.registered div.registered-only, body.registered dd.registered-only, body.registered dl.registered-only, body.registered dt.registered-only, body.registered fieldset.registered-only, body.registered form.registered-only, body.registered frameset.registered-only, body.registered h1.registered-only, body.registered h2.registered-only, body.registered h3.registered-only, body.registered h4.registered-only, body.registered h5.registered-only, body.registered h6.registered-only, body.registered hr.registered-only, body.registered isindex.registered-only, body.registered menu.registered-only, body.registered noframes.registered-only, body.registered noscript.registered-only, body.registered ol.registered-only, body.registered p.registered-only, body.registered pre.registered-only, body.registered ul.registered-only {
55
+ display: block; }
56
+
57
+ body.unregistered a.unregistered-only, body.unregistered abbr.unregistered-only, body.unregistered acronym.unregistered-only, body.unregistered b.unregistered-only, body.unregistered basefont.unregistered-only, body.unregistered bdo.unregistered-only, body.unregistered big.unregistered-only, body.unregistered br.unregistered-only, body.unregistered cite.unregistered-only, body.unregistered code.unregistered-only, body.unregistered dfn.unregistered-only, body.unregistered em.unregistered-only, body.unregistered font.unregistered-only, body.unregistered i.unregistered-only, body.unregistered img.unregistered-only, body.unregistered input.unregistered-only, body.unregistered kbd.unregistered-only, body.unregistered label.unregistered-only, body.unregistered q.unregistered-only, body.unregistered s.unregistered-only, body.unregistered samp.unregistered-only, body.unregistered select.unregistered-only, body.unregistered small.unregistered-only, body.unregistered span.unregistered-only, body.unregistered strike.unregistered-only, body.unregistered strong.unregistered-only, body.unregistered sub.unregistered-only, body.unregistered sup.unregistered-only, body.unregistered textarea.unregistered-only, body.unregistered tt.unregistered-only, body.unregistered u.unregistered-only, body.unregistered var.unregistered-only {
58
+ display: inline; }
59
+ body.unregistered address.unregistered-only, body.unregistered blockquote.unregistered-only, body.unregistered center.unregistered-only, body.unregistered dir.unregistered-only, body.unregistered div.unregistered-only, body.unregistered dd.unregistered-only, body.unregistered dl.unregistered-only, body.unregistered dt.unregistered-only, body.unregistered fieldset.unregistered-only, body.unregistered form.unregistered-only, body.unregistered frameset.unregistered-only, body.unregistered h1.unregistered-only, body.unregistered h2.unregistered-only, body.unregistered h3.unregistered-only, body.unregistered h4.unregistered-only, body.unregistered h5.unregistered-only, body.unregistered h6.unregistered-only, body.unregistered hr.unregistered-only, body.unregistered isindex.unregistered-only, body.unregistered menu.unregistered-only, body.unregistered noframes.unregistered-only, body.unregistered noscript.unregistered-only, body.unregistered ol.unregistered-only, body.unregistered p.unregistered-only, body.unregistered pre.unregistered-only, body.unregistered ul.unregistered-only {
60
+ display: block; }
@@ -0,0 +1,17 @@
1
+ .clearfix {
2
+ overflow: hidden;
3
+ display: inline-block; }
4
+ .clearfix {
5
+ display: block; }
6
+
7
+ .pie-clearfix {
8
+ display: inline-block; }
9
+ .pie-clearfix:after {
10
+ content: " ";
11
+ display: block;
12
+ height: 0;
13
+ clear: both;
14
+ overflow: hidden;
15
+ visibility: hidden; }
16
+ .pie-clearfix {
17
+ display: block; }
@@ -0,0 +1,3 @@
1
+ @import compass/layout.sass
2
+
3
+ +sticky-footer(72px, "#layout", "#layout_footer", "#footer")
@@ -0,0 +1,5 @@
1
+ @import compass/utilities/print.sass
2
+
3
+ +print-utilities
4
+
5
+ +print-utilities("screen")
@@ -0,0 +1,10 @@
1
+ @import compass/reset.sass
2
+
3
+ // Turn off the display for both of these classes
4
+ .unregistered-only, .registered-only
5
+ :display none
6
+ // Now turn only one of them back on depending on some other context.
7
+ body.registered
8
+ +reset-display(".registered-only")
9
+ body.unregistered
10
+ +reset-display(".unregistered-only")
@@ -0,0 +1,6 @@
1
+ @import compass/utilities.sass
2
+
3
+ .clearfix
4
+ +clearfix
5
+ .pie-clearfix
6
+ +pie-clearfix
@@ -0,0 +1,17 @@
1
+ # Require any additional compass plugins here.
2
+ project_type = :stand_alone
3
+ css_dir = "tmp"
4
+ sass_dir = "sass"
5
+ images_dir = "images"
6
+ output_style = :compact
7
+ # To enable relative image paths using the images_url() function:
8
+ # http_images_path = :relative
9
+ http_images_path = "/images"
10
+
11
+ asset_cache_buster do |path, file|
12
+ "busted=true"
13
+ end
14
+
15
+ asset_host do |path|
16
+ "http://assets%d.example.com" % (path.hash % 4)
17
+ end
@@ -0,0 +1,3 @@
1
+ .showgrid { background-image: url('http://assets2.example.com/images/grid.png?busted=true'); }
2
+
3
+ .inlinegrid { background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAUEAYAAACv1qP4AAAABmJLR0T///////8JWPfcAAAACXBIWXMAAABIAAAASABGyWs+AAAAZ0lEQVRYw+3QwQ2AIBAFUTEUwI3+uzN7gDscsIgxEuO8An52J11X73OudfxMraXkzHfO3Y98nQEhA0IGhAwIGRAyIGRAyICQASEDQgaEDAgZEDIgZEDIgJABoZzSGK3tPuN9ERFP7Nw4fg+c5g8V1wAAAABJRU5ErkJggg=='); }
@@ -0,0 +1,6 @@
1
+ .showgrid
2
+ background-image= image_url("grid.png")
3
+
4
+ .inlinegrid
5
+ background-image= inline_image("grid.png")
6
+
@@ -0,0 +1,9 @@
1
+ # Require any additional compass plugins here.
2
+ project_type = :stand_alone
3
+ css_dir = "tmp"
4
+ sass_dir = "sass"
5
+ images_dir = "images"
6
+ output_style = :nested
7
+ # To enable relative image paths using the images_url() function:
8
+ # http_images_path = :relative
9
+ http_images_path = "/images"
@@ -0,0 +1,13 @@
1
+ .font-size-26px {
2
+ font-size: 200%; }
3
+
4
+ .font-size-baseline {
5
+ font-size: 300%; }
6
+
7
+ .em-sizing {
8
+ width: 1em;
9
+ margin: 9em; }
10
+
11
+ .em-sizing-hack {
12
+ width: 1em;
13
+ *width: 0.975em; }
@@ -0,0 +1,3 @@
1
+ @import yui/modules/base.sass
2
+
3
+ +yui-base
@@ -0,0 +1,3 @@
1
+ @import yui/modules/fonts.sass
2
+
3
+ +yui-base-fonts
@@ -0,0 +1,3 @@
1
+ @import yui/modules/grids.sass
2
+
3
+ +yui-grids
@@ -0,0 +1,16 @@
1
+ @import yui/modules/fonts.sass
2
+ @import yui/modules/grids.sass
3
+
4
+ .font-size-26px
5
+ +font-size(26px)
6
+
7
+ .font-size-baseline
8
+ +font-size(30px, 10px)
9
+
10
+ .em-sizing
11
+ +em-size("width", 13px)
12
+ +em-size("margin", 99px, 11px)
13
+
14
+ .em-sizing-hack
15
+ +em-size-hacked("width", 13px)
16
+
@@ -0,0 +1,83 @@
1
+ require File.join(File.dirname(__FILE__),'test_helper')
2
+ require 'fileutils'
3
+ require 'compass'
4
+ require 'compass/exec'
5
+ require 'timeout'
6
+
7
+ class RailsIntegrationTest < Test::Unit::TestCase
8
+ include Compass::TestCaseHelper
9
+ include Compass::CommandLineHelper
10
+
11
+ def setup
12
+ Compass.configuration.reset!
13
+ end
14
+
15
+ def test_rails_install
16
+ within_tmp_directory do
17
+ generate_rails_app_directories("compass_rails")
18
+ Dir.chdir "compass_rails" do
19
+ compass("--rails", '--trace', ".") do |responder|
20
+ responder.respond_to "Is this OK? (Y/n) ", :with => "Y", :required => true
21
+ responder.respond_to "Emit compiled stylesheets to public/stylesheets/compiled/? (Y/n) ", :with => "Y", :required => true
22
+ end
23
+ # puts ">>>#{@last_result}<<<"
24
+ assert_action_performed :create, "./app/stylesheets/screen.sass"
25
+ assert_action_performed :create, "./config/initializers/compass.rb"
26
+ end
27
+ end
28
+ rescue LoadError
29
+ puts "Skipping rails test. Couldn't Load rails"
30
+ end
31
+
32
+ def test_rails_install_with_no_dialog
33
+ within_tmp_directory do
34
+ generate_rails_app_directories("compass_rails")
35
+ Dir.chdir "compass_rails" do
36
+ compass(*%w(--rails --trace --sass-dir app/stylesheets --css-dir public/stylesheets/compiled .))
37
+ assert_action_performed :create, "./app/stylesheets/screen.sass"
38
+ assert_action_performed :create, "./config/initializers/compass.rb"
39
+ end
40
+ end
41
+ rescue LoadError
42
+ puts "Skipping rails test. Couldn't Load rails"
43
+ end
44
+
45
+
46
+ def generate_rails_app_directories(name)
47
+ Dir.mkdir name
48
+ Dir.mkdir File.join(name, "config")
49
+ Dir.mkdir File.join(name, "config", "initializers")
50
+ end
51
+
52
+ # Generate a rails application without polluting our current set of requires
53
+ # with the rails libraries. This will allow testing against multiple versions of rails
54
+ # by manipulating the load path.
55
+ def generate_rails_app(name)
56
+ if pid = fork
57
+ Process.wait(pid)
58
+ if $?.exitstatus == 2
59
+ raise LoadError, "Couldn't load rails"
60
+ elsif $?.exitstatus != 0
61
+ raise "Failed to generate rails application."
62
+ end
63
+ else
64
+ begin
65
+ require 'rails/version'
66
+ require 'rails_generator'
67
+ require 'rails_generator/scripts/generate'
68
+ Rails::Generator::Base.use_application_sources!
69
+ capture_output do
70
+ Rails::Generator::Base.logger = Rails::Generator::SimpleLogger.new $stdout
71
+ Rails::Generator::Scripts::Generate.new.run([name], :generator => 'app')
72
+ end
73
+ rescue LoadError
74
+ Kernel.exit(2)
75
+ rescue => e
76
+ $stderr.puts e
77
+ Kernel.exit!(1)
78
+ end
79
+ Kernel.exit!(0)
80
+ end
81
+ end
82
+
83
+ end
@@ -0,0 +1,31 @@
1
+ require File.dirname(__FILE__)+'/test_helper'
2
+
3
+ class SassExtensionsTest < Test::Unit::TestCase
4
+ def test_simple
5
+ assert_equal "a b", nest("a", "b")
6
+ end
7
+ def test_left_side_expansion
8
+ assert_equal "a c, b c", nest("a, b", "c")
9
+ end
10
+ def test_right_side_expansion
11
+ assert_equal "a b, a c", nest("a", "b, c")
12
+ end
13
+ def test_both_sides_expansion
14
+ assert_equal "a c, a d, b c, b d", nest("a, b", "c, d")
15
+ end
16
+ def test_three_selectors_expansion
17
+ assert_equal "a b, a c, a d", nest("a", "b, c, d")
18
+ end
19
+ def test_third_argument_expansion
20
+ assert_equal "a b e, a b f, a c e, a c f, a d e, a d f", nest("a", "b, c, d", "e, f")
21
+ end
22
+
23
+ protected
24
+ def evaluation_content(options)
25
+ Sass::Script::Functions::EvaluationContext.new(options)
26
+ end
27
+ def nest(*arguments)
28
+ options = arguments.last.is_a?(Hash) ? arguments.pop : Hash.new
29
+ evaluation_content(options).nest(*arguments.map{|a| Sass::Script::String.new(a)}).to_s
30
+ end
31
+ end
@@ -0,0 +1,13 @@
1
+ module Compass
2
+ module TestCaseHelper
3
+ def absolutize(path)
4
+ if path.blank?
5
+ File.dirname(__FILE__)
6
+ elsif path[0] == ?/
7
+ "#{File.dirname(__FILE__)}#{path}"
8
+ else
9
+ "#{File.dirname(__FILE__)}/#{path}"
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,21 @@
1
+ need_gems = false
2
+
3
+ # allows testing with edge Haml by creating a test/haml symlink
4
+ linked_haml = File.dirname(__FILE__) + '/haml'
5
+
6
+ if File.exists?(linked_haml) && !$:.include?(linked_haml + '/lib')
7
+ puts "[ using linked Haml ]"
8
+ $:.unshift linked_haml + '/lib'
9
+ require 'sass'
10
+ else
11
+ need_gems = true
12
+ end
13
+
14
+ require 'rubygems' if need_gems
15
+
16
+ require 'compass'
17
+
18
+ require 'test/unit'
19
+
20
+ require File.join(File.dirname(__FILE__), 'test_case_helper')
21
+ require File.join(File.dirname(__FILE__), 'command_line_helper')
@@ -0,0 +1,20 @@
1
+ # XXX This file isn't in use at the moment, but will be used to help test
2
+ # XXX deep rails integration of compass features.
3
+ need_gems = false
4
+
5
+ # allows testing with edge Rails by creating a test/rails symlink
6
+ RAILS_ROOT = linked_rails = File.dirname(__FILE__) + '/rails'
7
+ RAILS_ENV = 'test'
8
+
9
+ if File.exists?(linked_rails) && !$:.include?(linked_rails + '/activesupport/lib')
10
+ puts "[ using linked Rails ]"
11
+ $:.unshift linked_rails + '/activesupport/lib'
12
+ $:.unshift linked_rails + '/actionpack/lib'
13
+ else
14
+ need_gems = true
15
+ end
16
+
17
+ require 'rubygems' if need_gems
18
+
19
+ require 'action_controller'
20
+ require 'action_view'