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,341 @@
1
+ // This is a port of YUI Grids version 2.6.0
2
+ // Note: This is not really tested yet. Use at your own risk.
3
+
4
+ @import compass/utilities/general/float.sass
5
+ @import fonts.sass
6
+
7
+ =yui-grids
8
+ +yui-grids-init
9
+ +yui-grid-templates
10
+ +yui-grid-divisions
11
+
12
+ =yui-grid-templates
13
+ #doc
14
+ +yui-document(750px)
15
+ #doc2
16
+ +yui-document(950px)
17
+ #doc3
18
+ +yui-document("fluid")
19
+ #doc4
20
+ +yui-document(974px)
21
+ .yui-t1
22
+ +yui-two-column-left-template(160px)
23
+ .yui-t2
24
+ +yui-two-column-left-template(180px)
25
+ .yui-t3
26
+ +yui-two-column-left-template(300px)
27
+ .yui-t4
28
+ +yui-two-column-right-template(180px)
29
+ .yui-t5
30
+ +yui-two-column-right-template(240px)
31
+ .yui-t6
32
+ +yui-two-column-right-template(300px)
33
+
34
+ =yui-grids-footer
35
+ clear: both
36
+
37
+ =yui-grids-body
38
+ +clearfix
39
+
40
+ =yui-grids-init(!footer = "#ft", !body = "#bd")
41
+ body
42
+ :text-align center
43
+ @if !footer
44
+ #{!footer}
45
+ +yui-grids-footer
46
+ @if !body
47
+ #{!body}
48
+ +yui-grids-body
49
+
50
+ =em-size(!style, !px_size, !base_font_size = !yui_default_base_font_size)
51
+ :#{!style}= 1em * !px_size / !base_font_size
52
+
53
+ =em-size-hacked(!style, !px_size, !base_font_size = !yui_default_base_font_size)
54
+ +em-size(!style, !px_size, !base_font_size)
55
+ +em-size("*"+!style, !px_size * 39 / 40, !base_font_size)
56
+
57
+ // All documents must have these styles. Setting a min-width is optional, but recommended. To omit it, pass false as the min_width value.
58
+ =yui-document-base(!min_width = 750px)
59
+ :margin auto
60
+ :text-align left
61
+ @if !min_width
62
+ :min-width= !min_width
63
+
64
+ =yui-block-base
65
+ :position relative
66
+ :_position static
67
+
68
+ =yui-main-block
69
+ :position static
70
+ :float none
71
+ :width auto
72
+
73
+
74
+ // Creates a fixed width document container
75
+ // Pass "fluid" for the width to create a document that grows with the width of the browser.
76
+ =yui-document(!width, !min_width = 750px, !base_font_size = !yui_default_base_font_size)
77
+ +yui-document-base(!min_width)
78
+ @if !width == "fluid"
79
+ :margin auto 10px
80
+ :width auto
81
+ @else
82
+ +em-size-hacked("width", !width, !base_font_size)
83
+
84
+ =yui-two-column-left-template(!column_width, !main_selector = "#yui-main", !block_selector = ".yui-b", !document_width = 750px, !min_width = 750px, !base_font_size = !yui_default_base_font_size)
85
+ +yui-document(!document_width, !min_width, !base_font_size)
86
+ #{!main_selector}
87
+ :width 100%
88
+ :float right
89
+ +em-size("margin-left", -!column_width - 10px, !base_font_size)
90
+ #{!block_selector}
91
+ +yui-main-block
92
+ +em-size-hacked("margin-left", !column_width, !base_font_size)
93
+ #{!block_selector}
94
+ +yui-block-base
95
+ :float left
96
+ +em-size-hacked("width", !column_width, !base_font_size)
97
+
98
+ =yui-two-column-right-template(!column_width, !main_selector = "#yui-main", !block_selector = ".yui-b", !document_width = 750px, !min_width = 750px, !base_font_size = !yui_default_base_font_size)
99
+ +yui-document(!document_width, !min_width, !base_font_size)
100
+ #{!main_selector}
101
+ :width 100%
102
+ :float left
103
+ +em-size("margin-right", -!column_width - 10px, !base_font_size)
104
+ #{!block_selector}
105
+ +yui-main-block
106
+ +em-size-hacked("margin-right", !column_width, !base_font_size)
107
+ #{!block_selector}
108
+ +yui-block-base
109
+ :float right
110
+ +em-size-hacked("width", !column_width, !base_font_size)
111
+
112
+ =yui-one-column-template(!main_selector = "#yui-main", !block_selector = ".yui-b", !document_width = 750px, !min_width = 750px, !base_font_size = !yui_default_base_font_size)
113
+ +yui-document(!document_width, !min_width, !base_font_size)
114
+ #{!main_selector}
115
+ :width 100%
116
+ #{!block_selector}
117
+ +yui-main-block
118
+ :display block
119
+ :margin 0 0 1em 0
120
+ #{!block_selector}
121
+ +yui-block-base
122
+
123
+ =yui-custom-template(!main_selector = "#yui-main", !block_selector = ".yui-b")
124
+ #{!main_selector}
125
+ :width 100%
126
+ #{!block_selector}
127
+ +yui-main-block
128
+ #{!block_selector}
129
+ +yui-block-base
130
+
131
+ =yui-grid-divisions(!unit = ".yui-u", !g_50_50 = ".yui-g", !g_33_33_33 = ".yui-gb", !g_67_33 = ".yui-gc", !g_33_67 = ".yui-gd", !g_75_25 = ".yui-ge", !g_25_75 = ".yui-gf")
132
+ #{nest(!g_50_50, !g_33_33_33, !unit)},
133
+ #{nest(!g_67_33, !unit)},
134
+ #{nest(!g_67_33, !g_50_50)},
135
+ #{nest(!g_33_67, !unit)},
136
+ #{nest(!g_33_33_33, !g_50_50)},
137
+ #{nest(!g_33_33_33, !g_33_33_33)},
138
+ #{nest(!g_33_33_33, !g_67_33)},
139
+ #{nest(!g_33_33_33, !g_33_67)},
140
+ #{nest(!g_33_33_33, !g_75_25)},
141
+ #{nest(!g_33_33_33, !g_25_75)},
142
+ #{nest(!g_33_33_33, !unit)}
143
+ float: left
144
+ margin-left: 2%
145
+ width: 32%
146
+
147
+ #{!g_33_33_33}
148
+ #{!g_33_33_33},
149
+ #{!g_67_33}
150
+ #{!unit}
151
+ *margin-left: 1.8%
152
+ _margin-left: 4%
153
+
154
+ #{nest(!g_50_50, !g_33_33_33, !unit)}
155
+ _margin-left: .8%
156
+
157
+ #{nest(!g_33_33_33, !unit)}
158
+ float: right
159
+
160
+ #{nest(!g_33_33_33, "div.first")}
161
+ margin-left: 0
162
+ float: left
163
+
164
+ #{!g_50_50},
165
+ #{!g_33_33_33}
166
+ #{!g_33_33_33}
167
+ div.first
168
+ *margin-right: 0
169
+ *width: 32%
170
+ _width: 31.7%
171
+
172
+ #{!g_33_33_33}
173
+ #{!g_67_33},
174
+ #{!g_33_67}
175
+ div.first
176
+ *margin-right: 0
177
+
178
+ #{nest(!g_33_33_33, !g_33_67, !unit)}
179
+ *width: 66%
180
+ _width: 61.2%
181
+
182
+ #{nest(!g_33_33_33, !g_33_67, "div.first")}
183
+ *width: 31%
184
+ _width: 29.5%
185
+
186
+ #{!g_50_50},
187
+ #{!g_33_33_33}
188
+ #{!g_67_33}
189
+ #{!unit}
190
+ width: 32%
191
+ _float: right
192
+ margin-right: 0
193
+ _margin-left: 0
194
+
195
+ #{nest(!g_33_33_33, !g_67_33, "div.first")}
196
+ width: 66%
197
+ *float: left
198
+ *margin-left: 0
199
+
200
+ #{!g_33_33_33}
201
+ #{!g_75_25},
202
+ #{!g_25_75}
203
+ #{!unit}
204
+ margin: 0
205
+
206
+ #{nest(!g_50_50, !unit)},
207
+ #{nest(!g_50_50, !g_50_50)},
208
+ #{nest(!g_50_50, !g_33_33_33)},
209
+ #{nest(!g_50_50, !g_67_33)},
210
+ #{nest(!g_50_50, !g_33_67)},
211
+ #{nest(!g_50_50, !g_75_25)},
212
+ #{nest(!g_50_50, !g_25_75)},
213
+ #{nest(!g_67_33, !unit)},
214
+ #{nest(!g_33_67, !g_50_50)},
215
+ #{nest(!g_50_50, !g_67_33, !unit)},
216
+ #{nest(!g_75_25, !unit)},
217
+ #{nest(!g_75_25, !g_50_50)},
218
+ #{nest(!g_25_75, !g_50_50)},
219
+ #{nest(!g_25_75, !unit)}
220
+ float: right
221
+
222
+ #{nest(!g_50_50, !g_67_33)},
223
+ #{nest(!g_50_50, !g_75_25)},
224
+ #{!g_50_50},
225
+ #{!g_67_33},
226
+ #{nest(!g_67_33, "div.first")},
227
+ #{!g_33_67},
228
+ #{!g_75_25},
229
+ #{!g_25_75}
230
+ div.first
231
+ float: left
232
+
233
+ #{!g_50_50},
234
+ #{!g_33_33_33},
235
+ #{!g_67_33},
236
+ #{!g_33_67},
237
+ #{!g_75_25},
238
+ #{!g_25_75}
239
+ #{!g_50_50}
240
+ #{!unit}
241
+ width: 49%
242
+ *width: 48.1%
243
+ *margin-left: 0
244
+
245
+ #{nest(!g_50_50, !g_50_50, "div.first")}
246
+ *margin: 0
247
+
248
+ #{nest(!g_33_33_33, !g_50_50, "div.first")}
249
+ *margin-right: 4%
250
+ _margin-right: 1.3%
251
+
252
+ #{nest(!g_33_33_33, !g_33_33_33, !unit)}
253
+ _margin-left: .7%
254
+
255
+ #{nest(!g_33_33_33, !g_50_50)},
256
+ #{nest(!g_33_33_33, !g_33_33_33)}
257
+ div.first
258
+ *margin-left: 0
259
+
260
+ #{!g_67_33},
261
+ #{!g_33_67}
262
+ #{!g_50_50}
263
+ #{!unit}
264
+ *width: 48.1%
265
+ *margin-left: 0
266
+
267
+ #{!g_50_50}
268
+ #{!unit},
269
+ #{!g_50_50},
270
+ #{!g_33_33_33},
271
+ #{!g_67_33},
272
+ #{!g_33_67},
273
+ #{!g_75_25},
274
+ #{!g_25_75}
275
+ width: 49.1%
276
+
277
+ #{nest(!g_50_50, !g_33_33_33)},
278
+ #{!g_33_33_33},
279
+ #{!g_67_33},
280
+ #{!g_33_67}
281
+ div.first
282
+ margin-left: 0
283
+
284
+ #{nest(!g_50_50, !g_67_33, "div.first")},
285
+ #{nest(!g_67_33, "div.first")},
286
+ #{nest(!g_33_67, !g_50_50)},
287
+ #{nest(!g_33_67, !unit)}
288
+ width: 66%
289
+
290
+ #{!g_33_67},
291
+ #{nest(!g_33_33_33, !g_33_67)}
292
+ div.first
293
+ width: 32%
294
+
295
+ #{nest(!g_50_50, !g_33_67, "div.first")}
296
+ _width: 29.9%
297
+
298
+ #{nest(!g_75_25, !unit)},
299
+ #{nest(!g_75_25, !g_50_50)},
300
+ #{nest(!g_25_75, "div.first")}
301
+ width: 24%
302
+
303
+ #{!g_33_33_33}
304
+ #{!g_75_25},
305
+ #{!g_25_75}
306
+ div#{!unit}
307
+ float: right
308
+
309
+ #{!g_33_33_33}
310
+ #{!g_75_25},
311
+ #{!g_25_75}
312
+ div.first
313
+ float: left
314
+
315
+ #{nest(!g_75_25, "div.first")},
316
+ #{nest(!g_25_75, !g_50_50)},
317
+ #{nest(!g_25_75, !unit)}
318
+ width: 74.2%
319
+
320
+ #{!g_33_33_33}
321
+ #{nest(!g_75_25, !unit)},
322
+ #{nest(!g_25_75, "div.first")}
323
+ *width: 24%
324
+ _width: 20%
325
+
326
+ #{!g_33_33_33}
327
+ #{nest(!g_75_25, "div.first")},
328
+ #{nest(!g_25_75, !unit)}
329
+ *width: 73.5%
330
+ _width: 65.5%
331
+
332
+ #{!g_50_50},
333
+ #{!g_33_33_33},
334
+ #{!g_67_33},
335
+ #{!g_33_67},
336
+ #{!g_75_25},
337
+ #{!g_25_75}
338
+ +clearfix
339
+
340
+ #{nest(!g_33_33_33, !unit)}
341
+ float: left
@@ -0,0 +1,61 @@
1
+ /*
2
+ Copyright (c) 2008, Yahoo! Inc. All rights reserved.
3
+ Code licensed under the BSD License:
4
+ http://developer.yahoo.net/yui/license.txt
5
+ version: 3.0.0pr2
6
+
7
+ =reset
8
+ html
9
+ :color #000
10
+ :background #FFF
11
+
12
+ body, div, dl, dt, dd, ul, ol, li,
13
+ h1, h2, h3, h4, h5, h6, pre, code,
14
+ form, fieldset, legend,input,
15
+ textarea, p, blockquote, th, td
16
+ :margin 0
17
+ :padding 0
18
+
19
+ li
20
+ :list-style none
21
+
22
+ h1, h2, h3, h4, h5, h6
23
+ :font-size 100%
24
+ :font-weight normal
25
+
26
+ code, th, address, caption,
27
+ cite, dfn, em, strong, var
28
+ :font-style normal
29
+ :font-weight normal
30
+
31
+ fieldset, img, abbr, acronym
32
+ :border 0
33
+
34
+ legend
35
+ :color #000
36
+
37
+ input, textarea, select
38
+ :font-family inherit
39
+ :font-size inherit
40
+ :font-weight inherit
41
+ :*font-size 100%
42
+
43
+ th, caption
44
+ :text-align left
45
+
46
+ table
47
+ :border-collapse collapse
48
+ :border-spacing 0
49
+
50
+ q
51
+ &:before, &:after
52
+ :content ''
53
+
54
+ abbr, acronym
55
+ :font-variant normal
56
+
57
+ sup
58
+ :vertical-align text-top
59
+
60
+ sub
61
+ :vertical-align text-bottom
@@ -0,0 +1 @@
1
+ stylesheet 'screen.sass', :media => "screen, projection"
@@ -0,0 +1,4 @@
1
+ @import yui.sass
2
+ @import compass/reset.sass
3
+
4
+ +yui
@@ -0,0 +1,23 @@
1
+ module Compass
2
+ end
3
+
4
+ ['dependencies', 'sass_extensions', 'core_ext', 'version', 'errors'].each do |file|
5
+ require File.join(File.dirname(__FILE__), 'compass', file)
6
+ end
7
+
8
+ module Compass
9
+ extend Compass::Version
10
+ def base_directory
11
+ File.expand_path(File.join(File.dirname(__FILE__), '..'))
12
+ end
13
+ def lib_directory
14
+ File.expand_path(File.join(File.dirname(__FILE__)))
15
+ end
16
+ module_function :base_directory, :lib_directory
17
+ end
18
+
19
+ require File.join(File.dirname(__FILE__), 'compass', 'configuration')
20
+ require File.join(File.dirname(__FILE__), 'compass', 'frameworks')
21
+ require File.join(File.dirname(__FILE__), 'compass', 'app_integration')
22
+
23
+
@@ -0,0 +1,110 @@
1
+ module Compass
2
+ module Actions
3
+
4
+ attr_writer :logger
5
+
6
+ def logger
7
+ @logger ||= Logger.new
8
+ end
9
+
10
+ # copy/process a template in the compass template directory to the project directory.
11
+ def copy(from, to, options = nil, binary = false)
12
+ options ||= self.options if self.respond_to?(:options)
13
+ contents = File.new(from).read
14
+ write_file to, contents, options, binary
15
+ end
16
+
17
+ # create a directory and all the directories necessary to reach it.
18
+ def directory(dir, options = nil)
19
+ options ||= self.options if self.respond_to?(:options)
20
+ if File.exists?(dir) && File.directory?(dir)
21
+ logger.record :exists, basename(dir) unless options[:quiet]
22
+ elsif File.exists?(dir)
23
+ msg = "#{basename(dir)} already exists and is not a directory."
24
+ raise Compass::FilesystemConflict.new(msg)
25
+ else
26
+ logger.record :directory, separate("#{basename(dir)}/")
27
+ FileUtils.mkdir_p(dir) unless options[:dry_run]
28
+ end
29
+ end
30
+
31
+ # Write a file given the file contents as a string
32
+ def write_file(file_name, contents, options = nil, binary = false)
33
+ options ||= self.options if self.respond_to?(:options)
34
+ skip_write = options[:dry_run]
35
+ if File.exists?(file_name)
36
+ existing_contents = IO.read(file_name)
37
+ if existing_contents == contents
38
+ logger.record :identical, basename(file_name)
39
+ skip_write = true
40
+ elsif options[:force]
41
+ logger.record :overwrite, basename(file_name)
42
+ else
43
+ msg = "File #{basename(file_name)} already exists. Run with --force to force overwrite."
44
+ raise Compass::FilesystemConflict.new(msg)
45
+ end
46
+ else
47
+ logger.record :create, basename(file_name)
48
+ end
49
+ if skip_write
50
+ FileUtils.touch file_name
51
+ else
52
+ mode = "w"
53
+ mode << "b" if binary
54
+ open(file_name, mode) do |file|
55
+ file.write(contents)
56
+ end
57
+ end
58
+ end
59
+
60
+ # Compile one Sass file
61
+ def compile(sass_filename, css_filename, options)
62
+ if options[:force] || Sass::Plugin.exact_stylesheet_needs_update?(css_filename, sass_filename)
63
+ logger.record :compile, basename(sass_filename) unless options[:quiet]
64
+ engine = ::Sass::Engine.new(open(sass_filename).read,
65
+ :filename => sass_filename,
66
+ :line_comments => options[:line_comments],
67
+ :style => options[:style],
68
+ :css_filename => css_filename,
69
+ :load_paths => options[:load_paths],
70
+ :cache_location => options[:cache_location])
71
+ css_content = engine.render
72
+ write_file(css_filename, css_content, options.merge(:force => true))
73
+ else
74
+ logger.record :unchanged, basename(sass_filename) unless options[:quiet]
75
+ end
76
+ end
77
+
78
+ def remove(file_name)
79
+ if File.exists?(file_name)
80
+ File.unlink file_name
81
+ logger.record :remove, basename(file_name)
82
+ end
83
+ end
84
+
85
+ def basename(file)
86
+ relativize(file) {|f| File.basename(file)}
87
+ end
88
+
89
+ def relativize(path)
90
+ if path.index(working_path+File::SEPARATOR) == 0
91
+ path[(working_path+File::SEPARATOR).length..-1]
92
+ elsif block_given?
93
+ yield path
94
+ else
95
+ path
96
+ end
97
+ end
98
+
99
+ # Write paths like we're on unix and then fix it
100
+ def separate(path)
101
+ path.gsub(%r{/}, File::SEPARATOR)
102
+ end
103
+
104
+ # Removes the trailing separator, if any, from a path.
105
+ def strip_trailing_separator(path)
106
+ (path[-1..-1] == File::SEPARATOR) ? path[0..-2] : path
107
+ end
108
+
109
+ end
110
+ end