radiant 1.0.0.rc1 → 1.0.0.rc2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of radiant might be problematic. Click here for more details.

Files changed (623) hide show
  1. data/app/controllers/admin/resource_controller.rb +1 -0
  2. data/app/controllers/application_controller.rb +1 -1
  3. data/app/models/deprecated_tags.rb +5 -48
  4. data/app/models/user_action_observer.rb +8 -2
  5. data/app/views/layouts/application.html.haml +1 -1
  6. data/config/boot.rb +2 -2
  7. data/config/environment.rb +5 -3
  8. data/config/initializers/compass.rb +5 -0
  9. data/config/locales/en.yml +2 -2
  10. data/features/step_definitions/admin/pages_management_steps.rb +6 -1
  11. data/features/support/paths.rb +13 -0
  12. data/lib/generators/extension/templates/cucumber_env.rb +5 -1
  13. data/lib/generators/extension/templates/cucumber_paths.rb +20 -12
  14. data/lib/generators/extension/templates/gemspec.rb +10 -5
  15. data/lib/generators/instance/templates/instance_environment.rb +4 -2
  16. data/lib/radiant.rb +1 -1
  17. data/lib/radiant/gem_dependency_fix.rb +1 -1
  18. data/lib/radiant/taggable.rb +42 -3
  19. data/lib/tasks/framework.rake +6 -6
  20. data/{vendor/plugins/haml/test/sass/results/warn.css → log/.keep} +0 -0
  21. data/radiant.gemspec +3 -2
  22. data/script/console +2 -2
  23. data/spec/controllers/admin/pages_controller_spec.rb +1 -1
  24. data/spec/lib/radiant/taggable_spec.rb +53 -0
  25. data/vendor/extensions/archive/Rakefile +3 -3
  26. data/vendor/extensions/archive/features/support/env.rb +5 -1
  27. data/vendor/extensions/archive/features/support/paths.rb +20 -12
  28. data/vendor/extensions/archive/radiant-archive-extension.gemspec +10 -5
  29. data/vendor/extensions/archive/tmp/cache/meta/0e/da69d02186242cdfda62e46044566f2bc50f3a +0 -0
  30. data/vendor/extensions/{assets → clipped}/LICENSE +0 -0
  31. data/vendor/extensions/{assets → clipped}/README.md +21 -21
  32. data/vendor/extensions/{assets → clipped}/Rakefile +29 -31
  33. data/vendor/extensions/{assets → clipped}/app/controllers/admin/assets_controller.rb +16 -11
  34. data/vendor/extensions/clipped/app/controllers/admin/page_attachments_controller.rb +18 -0
  35. data/vendor/extensions/clipped/app/helpers/admin/assets_helper.rb +16 -0
  36. data/vendor/extensions/{assets → clipped}/app/models/asset.rb +12 -9
  37. data/vendor/extensions/{assets → clipped}/app/models/asset_tags.rb +36 -53
  38. data/vendor/extensions/{assets → clipped}/app/models/asset_type.rb +1 -7
  39. data/vendor/extensions/{assets → clipped}/app/models/old_page_attachment.rb +0 -0
  40. data/vendor/extensions/clipped/app/models/page_attachment.rb +21 -0
  41. data/vendor/extensions/{assets → clipped}/app/views/admin/assets/_asset.html.haml +2 -2
  42. data/vendor/extensions/{assets → clipped}/app/views/admin/assets/_asset_table.html.haml +4 -4
  43. data/vendor/extensions/clipped/app/views/admin/assets/_errors.html.haml +3 -0
  44. data/vendor/extensions/{assets → clipped}/app/views/admin/assets/_form.html.haml +2 -2
  45. data/vendor/extensions/{assets → clipped}/app/views/admin/assets/_page_assets.html.haml +1 -1
  46. data/vendor/extensions/{assets → clipped}/app/views/admin/assets/_search.html.haml +0 -0
  47. data/vendor/extensions/{assets → clipped}/app/views/admin/assets/_search_results.html.haml +1 -1
  48. data/vendor/extensions/{assets → clipped}/app/views/admin/assets/edit.html.haml +7 -8
  49. data/vendor/extensions/{assets → clipped}/app/views/admin/assets/index.html.haml +3 -2
  50. data/vendor/extensions/{assets → clipped}/app/views/admin/assets/new.html.haml +2 -2
  51. data/vendor/extensions/clipped/app/views/admin/assets/refresh.html.haml +14 -0
  52. data/vendor/extensions/{assets → clipped}/app/views/admin/assets/remove.html.haml +3 -3
  53. data/vendor/extensions/{assets → clipped}/app/views/admin/configuration/_edit.html.haml +1 -1
  54. data/vendor/extensions/{assets → clipped}/app/views/admin/configuration/_show.html.haml +1 -1
  55. data/vendor/extensions/clipped/app/views/admin/page_attachments/_attachment.html.haml +25 -0
  56. data/vendor/extensions/{assets → clipped}/app/views/admin/page_parts/_page_part.html.haml +3 -2
  57. data/vendor/extensions/{assets → clipped}/app/views/admin/pages/_asset_popups.html.haml +7 -7
  58. data/vendor/extensions/clipped/app/views/admin/pages/_assets.html.haml +11 -0
  59. data/vendor/extensions/{assets → clipped}/app/views/admin/removed/_assets_bucket.html.haml +1 -1
  60. data/vendor/extensions/{assets → clipped}/app/views/admin/removed/_assets_container.html.haml +9 -9
  61. data/vendor/extensions/{assets → clipped}/app/views/admin/removed/_bucket.html.haml +1 -1
  62. data/vendor/extensions/{assets → clipped}/app/views/admin/removed/_bucket_asset.html.haml +2 -2
  63. data/vendor/extensions/clipped/app/views/admin/removed/_show_bucket_link.html.haml +4 -0
  64. data/vendor/extensions/{assets → clipped}/app/views/admin/removed/_upload_to_page.html.haml +2 -2
  65. data/vendor/extensions/{assets → clipped}/app/views/admin/removed/bucket/_iframe.html.haml +0 -0
  66. data/vendor/extensions/{assets → clipped}/artwork/icons.png +0 -0
  67. data/vendor/extensions/{assets/assets_extension.rb → clipped/clipped_extension.rb} +10 -10
  68. data/vendor/extensions/{assets → clipped}/config/initializers/interpolation.rb +0 -0
  69. data/vendor/extensions/clipped/config/initializers/processors.rb +12 -0
  70. data/vendor/extensions/{assets → clipped}/config/initializers/radiant_config.rb +5 -4
  71. data/vendor/extensions/{assets → clipped}/config/locales/en.yml +6 -3
  72. data/vendor/extensions/{assets → clipped}/config/locales/nl.yml +1 -1
  73. data/vendor/extensions/{assets → clipped}/config/routes.rb +2 -2
  74. data/vendor/extensions/clipped/cucumber.yml +1 -0
  75. data/vendor/extensions/{assets → clipped}/db/migrate/001_create_assets.rb +0 -0
  76. data/vendor/extensions/{assets → clipped}/db/migrate/002_create_paperclip_attributes.rb +0 -0
  77. data/vendor/extensions/{assets → clipped}/db/migrate/003_create_user_observer.rb +0 -0
  78. data/vendor/extensions/{assets → clipped}/db/migrate/004_create_page_attachments.rb +0 -0
  79. data/vendor/extensions/{assets → clipped}/db/migrate/005_rename_users.rb +0 -0
  80. data/vendor/extensions/{assets → clipped}/db/migrate/20090316132151_disable_file_types.rb +0 -0
  81. data/vendor/extensions/{assets → clipped}/db/migrate/20110513205050_asset_uuid.rb +0 -0
  82. data/vendor/extensions/clipped/features/support/env.rb +11 -0
  83. data/vendor/extensions/clipped/features/support/paths.rb +22 -0
  84. data/vendor/extensions/{assets/lib/assets_admin_ui.rb → clipped/lib/clipped_admin_ui.rb} +1 -1
  85. data/vendor/extensions/{assets → clipped}/lib/page_asset_associations.rb +1 -1
  86. data/vendor/extensions/{assets → clipped}/lib/paperclip/frame_grab.rb +0 -0
  87. data/vendor/extensions/clipped/lib/radiant-clipped-extension.rb +2 -0
  88. data/vendor/extensions/clipped/lib/radiant-clipped-extension/version.rb +3 -0
  89. data/vendor/extensions/{assets/lib/tasks/assets_extension_tasks.rake → clipped/lib/tasks/clipped_extension_tasks.rake} +22 -16
  90. data/vendor/extensions/{assets → clipped}/lib/tasks/paperclip_tasks.rake +0 -0
  91. data/{public → vendor/extensions/clipped/public}/flash/ZeroClipboard.swf +0 -0
  92. data/{public → vendor/extensions/clipped/public}/images/admin/assets/add.png +0 -0
  93. data/{public → vendor/extensions/clipped/public}/images/admin/assets/archive_icon.png +0 -0
  94. data/{public → vendor/extensions/clipped/public}/images/admin/assets/audio_icon.png +0 -0
  95. data/{public → vendor/extensions/clipped/public}/images/admin/assets/audio_thumbnail.png +0 -0
  96. data/{public → vendor/extensions/clipped/public}/images/admin/assets/c_icon.png +0 -0
  97. data/{public → vendor/extensions/clipped/public}/images/admin/assets/copy.png +0 -0
  98. data/{public → vendor/extensions/clipped/public}/images/admin/assets/css_icon.png +0 -0
  99. data/{public → vendor/extensions/clipped/public}/images/admin/assets/database_icon.png +0 -0
  100. data/{public → vendor/extensions/clipped/public}/images/admin/assets/delete.png +0 -0
  101. data/{public → vendor/extensions/clipped/public}/images/admin/assets/document_icon.png +0 -0
  102. data/{public → vendor/extensions/clipped/public}/images/admin/assets/document_thumbnail.png +0 -0
  103. data/{public → vendor/extensions/clipped/public}/images/admin/assets/flash_icon.png +0 -0
  104. data/{public → vendor/extensions/clipped/public}/images/admin/assets/flash_thumbnail.png +0 -0
  105. data/{public → vendor/extensions/clipped/public}/images/admin/assets/font_icon.png +0 -0
  106. data/{public → vendor/extensions/clipped/public}/images/admin/assets/gzip_icon.png +0 -0
  107. data/{public → vendor/extensions/clipped/public}/images/admin/assets/html_icon.png +0 -0
  108. data/{public → vendor/extensions/clipped/public}/images/admin/assets/image_icon.png +0 -0
  109. data/{public → vendor/extensions/clipped/public}/images/admin/assets/image_thumbnail.png +0 -0
  110. data/{public → vendor/extensions/clipped/public}/images/admin/assets/java_icon.png +0 -0
  111. data/{public → vendor/extensions/clipped/public}/images/admin/assets/page_edit.png +0 -0
  112. data/{public → vendor/extensions/clipped/public}/images/admin/assets/perl_icon.png +0 -0
  113. data/{public → vendor/extensions/clipped/public}/images/admin/assets/php_icon.png +0 -0
  114. data/{public → vendor/extensions/clipped/public}/images/admin/assets/presentation_icon.png +0 -0
  115. data/{public → vendor/extensions/clipped/public}/images/admin/assets/python_icon.png +0 -0
  116. data/{public → vendor/extensions/clipped/public}/images/admin/assets/reorder_assets.png +0 -0
  117. data/{public → vendor/extensions/clipped/public}/images/admin/assets/ruby_icon.png +0 -0
  118. data/{public → vendor/extensions/clipped/public}/images/admin/assets/script_icon.png +0 -0
  119. data/{public → vendor/extensions/clipped/public}/images/admin/assets/spreadsheet_icon.png +0 -0
  120. data/{public → vendor/extensions/clipped/public}/images/admin/assets/tar_icon.png +0 -0
  121. data/{public → vendor/extensions/clipped/public}/images/admin/assets/unknown_icon.png +0 -0
  122. data/{public → vendor/extensions/clipped/public}/images/admin/assets/unknown_thumbnail.png +0 -0
  123. data/{public → vendor/extensions/clipped/public}/images/admin/assets/video_icon.png +0 -0
  124. data/{public → vendor/extensions/clipped/public}/images/admin/assets/video_thumbnail.png +0 -0
  125. data/{public → vendor/extensions/clipped/public}/images/admin/assets/xml_icon.png +0 -0
  126. data/{public → vendor/extensions/clipped/public}/images/admin/assets/zip_icon.png +0 -0
  127. data/vendor/extensions/{assets → clipped}/public/javascripts/admin/assets.js +66 -8
  128. data/vendor/extensions/{assets → clipped}/public/stylesheets/sass/admin/assets.sass +12 -6
  129. data/vendor/extensions/clipped/radiant-clipped-extension.gemspec +33 -0
  130. data/vendor/extensions/{assets → clipped}/spec/controllers/admin/assets_controller_spec.rb +0 -0
  131. data/vendor/extensions/clipped/spec/controllers/admin/page_attachments_controller_spec.rb +50 -0
  132. data/vendor/extensions/{assets → clipped}/spec/datasets/assets_dataset.rb +2 -1
  133. data/vendor/extensions/{assets/spec/lib/tag_deprecation_spec.rb → clipped/spec/lib/asset_tags_spec.rb} +3 -15
  134. data/vendor/extensions/{assets → clipped}/spec/models/asset_spec.rb +3 -2
  135. data/vendor/extensions/{assets → clipped}/spec/models/asset_type_spec.rb +0 -0
  136. data/vendor/extensions/{assets → clipped}/spec/spec.opts +0 -0
  137. data/vendor/extensions/{assets → clipped}/spec/spec_helper.rb +0 -0
  138. data/vendor/extensions/{assets → clipped}/wireframes/edit-page-assets-2.bmml +0 -0
  139. data/vendor/extensions/{assets → clipped}/wireframes/edit-page-assets-2.png +0 -0
  140. data/vendor/extensions/{assets → clipped}/wireframes/edit-page-assets-3.bmml +0 -0
  141. data/vendor/extensions/{assets → clipped}/wireframes/edit-page-assets-3.png +0 -0
  142. data/vendor/extensions/{assets → clipped}/wireframes/edit-page-assets.bmml +0 -0
  143. data/vendor/extensions/{assets → clipped}/wireframes/edit-page-assets.png +0 -0
  144. data/vendor/extensions/{assets → clipped}/wireframes/edit-page.bmml +0 -0
  145. data/vendor/extensions/{assets → clipped}/wireframes/edit-page.png +0 -0
  146. data/vendor/extensions/sheets/Rakefile +30 -18
  147. data/vendor/extensions/sheets/app/controllers/admin/sheet_resource_controller.rb +1 -1
  148. data/vendor/extensions/sheets/app/models/sheet.rb +4 -0
  149. data/vendor/extensions/sheets/app/views/admin/scripts/index.html.haml +9 -5
  150. data/vendor/extensions/sheets/app/views/admin/styles/index.html.haml +1 -1
  151. data/vendor/extensions/sheets/config/locales/en.yml +3 -1
  152. data/vendor/extensions/sheets/features/admin/managing_javascripts.feature +65 -0
  153. data/vendor/extensions/sheets/features/admin/managing_stylesheets.feature +65 -0
  154. data/vendor/extensions/sheets/features/support/env.rb +2 -7
  155. data/vendor/extensions/sheets/features/support/paths.rb +9 -12
  156. data/vendor/extensions/sheets/lib/radiant-sheets-extension/version.rb +1 -1
  157. data/vendor/extensions/sheets/radiant-sheets-extension.gemspec +9 -4
  158. data/vendor/extensions/sheets/spec/datasets/javascripts_dataset.rb +3 -1
  159. data/vendor/extensions/sheets/spec/datasets/stylesheets_dataset.rb +3 -1
  160. data/vendor/extensions/sheets/spec/lib/javascript_tags_spec.rb +4 -4
  161. data/vendor/extensions/sheets/spec/lib/stylesheet_tags_spec.rb +4 -4
  162. metadata +189 -599
  163. data/Gemfile +0 -3
  164. data/lib/generators/extension/templates/cucumber_datasets_loader.rb +0 -3
  165. data/public/assets/1/2375_1115822414591_1197894784_30347214_1109_n.jpg +0 -0
  166. data/public/assets/1/2375_1115822414591_1197894784_30347214_1109_n_icon.png +0 -0
  167. data/public/assets/1/2375_1115822414591_1197894784_30347214_1109_n_normal.jpg +0 -0
  168. data/public/assets/1/2375_1115822414591_1197894784_30347214_1109_n_thumbnail.png +0 -0
  169. data/public/images/roasters/banner.jpg +0 -0
  170. data/public/images/roasters/closelabel.gif +0 -0
  171. data/public/images/roasters/comment.png +0 -0
  172. data/public/images/roasters/gallery1.jpg +0 -0
  173. data/public/images/roasters/gallery2.jpg +0 -0
  174. data/public/images/roasters/gallery3.jpg +0 -0
  175. data/public/images/roasters/gallery4.jpg +0 -0
  176. data/public/images/roasters/gift.gif +0 -0
  177. data/public/images/roasters/green.gif +0 -0
  178. data/public/images/roasters/nav-background.gif +0 -0
  179. data/public/images/roasters/nav-divider.gif +0 -0
  180. data/public/images/roasters/nextlabel.gif +0 -0
  181. data/public/images/roasters/open.gif +0 -0
  182. data/public/images/roasters/preview-1.jpg +0 -0
  183. data/public/images/roasters/preview.jpg +0 -0
  184. data/public/images/roasters/prevlabel.gif +0 -0
  185. data/public/images/roasters/prize.gif +0 -0
  186. data/public/images/roasters/recycle.gif +0 -0
  187. data/public/images/roasters/rss.gif +0 -0
  188. data/public/images/roasters/thumb-grinder.jpg +0 -0
  189. data/public/images/roasters/thumb-grower.jpg +0 -0
  190. data/public/images/roasters/thumb-roaster.jpg +0 -0
  191. data/public/images/roasters/truck.gif +0 -0
  192. data/vendor/extensions/assets/HELP_admin.markdown +0 -69
  193. data/vendor/extensions/assets/VERSION +0 -1
  194. data/vendor/extensions/assets/app/controllers/admin/page_attachments_controller.rb +0 -45
  195. data/vendor/extensions/assets/app/helpers/admin/assets_helper.rb +0 -11
  196. data/vendor/extensions/assets/app/models/page_attachment.rb +0 -14
  197. data/vendor/extensions/assets/app/views/admin/assets/_errors.html.haml +0 -3
  198. data/vendor/extensions/assets/app/views/admin/page_attachments/_attachment.html.haml +0 -22
  199. data/vendor/extensions/assets/app/views/admin/page_attachments/_new_attachment.html.haml +0 -18
  200. data/vendor/extensions/assets/app/views/admin/pages/_assets.html.haml +0 -13
  201. data/vendor/extensions/assets/app/views/admin/removed/_show_bucket_link.html.haml +0 -4
  202. data/vendor/extensions/assets/lib/tag_deprecation.rb +0 -73
  203. data/vendor/extensions/assets/public/flash/ZeroClipboard.swf +0 -0
  204. data/vendor/extensions/assets/public/images/admin/assets/add.png +0 -0
  205. data/vendor/extensions/assets/public/images/admin/assets/archive_icon.png +0 -0
  206. data/vendor/extensions/assets/public/images/admin/assets/audio_icon.png +0 -0
  207. data/vendor/extensions/assets/public/images/admin/assets/audio_thumbnail.png +0 -0
  208. data/vendor/extensions/assets/public/images/admin/assets/c_icon.png +0 -0
  209. data/vendor/extensions/assets/public/images/admin/assets/copy.png +0 -0
  210. data/vendor/extensions/assets/public/images/admin/assets/css_icon.png +0 -0
  211. data/vendor/extensions/assets/public/images/admin/assets/database_icon.png +0 -0
  212. data/vendor/extensions/assets/public/images/admin/assets/delete.png +0 -0
  213. data/vendor/extensions/assets/public/images/admin/assets/document_icon.png +0 -0
  214. data/vendor/extensions/assets/public/images/admin/assets/document_thumbnail.png +0 -0
  215. data/vendor/extensions/assets/public/images/admin/assets/flash_icon.png +0 -0
  216. data/vendor/extensions/assets/public/images/admin/assets/flash_thumbnail.png +0 -0
  217. data/vendor/extensions/assets/public/images/admin/assets/font_icon.png +0 -0
  218. data/vendor/extensions/assets/public/images/admin/assets/gzip_icon.png +0 -0
  219. data/vendor/extensions/assets/public/images/admin/assets/html_icon.png +0 -0
  220. data/vendor/extensions/assets/public/images/admin/assets/image_icon.png +0 -0
  221. data/vendor/extensions/assets/public/images/admin/assets/image_thumbnail.png +0 -0
  222. data/vendor/extensions/assets/public/images/admin/assets/java_icon.png +0 -0
  223. data/vendor/extensions/assets/public/images/admin/assets/page_edit.png +0 -0
  224. data/vendor/extensions/assets/public/images/admin/assets/perl_icon.png +0 -0
  225. data/vendor/extensions/assets/public/images/admin/assets/php_icon.png +0 -0
  226. data/vendor/extensions/assets/public/images/admin/assets/presentation_icon.png +0 -0
  227. data/vendor/extensions/assets/public/images/admin/assets/python_icon.png +0 -0
  228. data/vendor/extensions/assets/public/images/admin/assets/reorder_assets.png +0 -0
  229. data/vendor/extensions/assets/public/images/admin/assets/ruby_icon.png +0 -0
  230. data/vendor/extensions/assets/public/images/admin/assets/script_icon.png +0 -0
  231. data/vendor/extensions/assets/public/images/admin/assets/spreadsheet_icon.png +0 -0
  232. data/vendor/extensions/assets/public/images/admin/assets/tar_icon.png +0 -0
  233. data/vendor/extensions/assets/public/images/admin/assets/unknown_icon.png +0 -0
  234. data/vendor/extensions/assets/public/images/admin/assets/unknown_thumbnail.png +0 -0
  235. data/vendor/extensions/assets/public/images/admin/assets/video_icon.png +0 -0
  236. data/vendor/extensions/assets/public/images/admin/assets/video_thumbnail.png +0 -0
  237. data/vendor/extensions/assets/public/images/admin/assets/xml_icon.png +0 -0
  238. data/vendor/extensions/assets/public/images/admin/assets/zip_icon.png +0 -0
  239. data/vendor/extensions/assets/spec/controllers/admin/page_attachment_controller_spec.rb +0 -51
  240. data/vendor/extensions/assets/spec/lib/asset_tags_spec.rb +0 -9
  241. data/vendor/plugins/haml/CONTRIBUTING +0 -4
  242. data/vendor/plugins/haml/MIT-LICENSE +0 -20
  243. data/vendor/plugins/haml/README.md +0 -298
  244. data/vendor/plugins/haml/Rakefile +0 -436
  245. data/vendor/plugins/haml/TODO +0 -53
  246. data/vendor/plugins/haml/VERSION +0 -1
  247. data/vendor/plugins/haml/VERSION_NAME +0 -1
  248. data/vendor/plugins/haml/bin/css2sass +0 -13
  249. data/vendor/plugins/haml/bin/haml +0 -9
  250. data/vendor/plugins/haml/bin/html2haml +0 -7
  251. data/vendor/plugins/haml/bin/sass +0 -8
  252. data/vendor/plugins/haml/bin/sass-convert +0 -7
  253. data/vendor/plugins/haml/doc-src/FAQ.md +0 -187
  254. data/vendor/plugins/haml/doc-src/HAML_CHANGELOG.md +0 -1091
  255. data/vendor/plugins/haml/doc-src/HAML_REFERENCE.md +0 -1344
  256. data/vendor/plugins/haml/doc-src/INDENTED_SYNTAX.md +0 -210
  257. data/vendor/plugins/haml/doc-src/SASS_CHANGELOG.md +0 -1914
  258. data/vendor/plugins/haml/doc-src/SASS_REFERENCE.md +0 -1680
  259. data/vendor/plugins/haml/doc-src/SCSS_FOR_SASS_USERS.md +0 -155
  260. data/vendor/plugins/haml/ext/extconf.rb +0 -10
  261. data/vendor/plugins/haml/extra/haml-mode.el +0 -753
  262. data/vendor/plugins/haml/extra/sass-mode.el +0 -207
  263. data/vendor/plugins/haml/extra/update_watch.rb +0 -13
  264. data/vendor/plugins/haml/haml.gemspec +0 -35
  265. data/vendor/plugins/haml/init.rb +0 -18
  266. data/vendor/plugins/haml/init.rbc +0 -404
  267. data/vendor/plugins/haml/lib/haml.rb +0 -44
  268. data/vendor/plugins/haml/lib/haml.rbc +0 -569
  269. data/vendor/plugins/haml/lib/haml/buffer.rb +0 -320
  270. data/vendor/plugins/haml/lib/haml/buffer.rbc +0 -4048
  271. data/vendor/plugins/haml/lib/haml/engine.rb +0 -308
  272. data/vendor/plugins/haml/lib/haml/engine.rbc +0 -3852
  273. data/vendor/plugins/haml/lib/haml/error.rb +0 -22
  274. data/vendor/plugins/haml/lib/haml/error.rbc +0 -339
  275. data/vendor/plugins/haml/lib/haml/exec.rb +0 -862
  276. data/vendor/plugins/haml/lib/haml/filters.rb +0 -371
  277. data/vendor/plugins/haml/lib/haml/filters.rbc +0 -5617
  278. data/vendor/plugins/haml/lib/haml/helpers.rb +0 -605
  279. data/vendor/plugins/haml/lib/haml/helpers.rbc +0 -7086
  280. data/vendor/plugins/haml/lib/haml/helpers/action_view_extensions.rb +0 -57
  281. data/vendor/plugins/haml/lib/haml/helpers/action_view_extensions.rbc +0 -522
  282. data/vendor/plugins/haml/lib/haml/helpers/action_view_mods.rb +0 -244
  283. data/vendor/plugins/haml/lib/haml/helpers/action_view_mods.rbc +0 -5515
  284. data/vendor/plugins/haml/lib/haml/helpers/xss_mods.rb +0 -165
  285. data/vendor/plugins/haml/lib/haml/html.rb +0 -428
  286. data/vendor/plugins/haml/lib/haml/html/erb.rb +0 -141
  287. data/vendor/plugins/haml/lib/haml/precompiler.rb +0 -1104
  288. data/vendor/plugins/haml/lib/haml/precompiler.rbc +0 -22247
  289. data/vendor/plugins/haml/lib/haml/railtie.rb +0 -21
  290. data/vendor/plugins/haml/lib/haml/railtie.rbc +0 -409
  291. data/vendor/plugins/haml/lib/haml/root.rb +0 -7
  292. data/vendor/plugins/haml/lib/haml/root.rbc +0 -160
  293. data/vendor/plugins/haml/lib/haml/shared.rb +0 -78
  294. data/vendor/plugins/haml/lib/haml/shared.rbc +0 -1137
  295. data/vendor/plugins/haml/lib/haml/template.rb +0 -97
  296. data/vendor/plugins/haml/lib/haml/template.rbc +0 -1838
  297. data/vendor/plugins/haml/lib/haml/template/options.rb +0 -16
  298. data/vendor/plugins/haml/lib/haml/template/options.rbc +0 -235
  299. data/vendor/plugins/haml/lib/haml/template/patch.rb +0 -58
  300. data/vendor/plugins/haml/lib/haml/template/plugin.rb +0 -122
  301. data/vendor/plugins/haml/lib/haml/template/plugin.rbc +0 -2720
  302. data/vendor/plugins/haml/lib/haml/util.rb +0 -809
  303. data/vendor/plugins/haml/lib/haml/util.rbc +0 -12059
  304. data/vendor/plugins/haml/lib/haml/util/subset_map.rb +0 -101
  305. data/vendor/plugins/haml/lib/haml/util/subset_map.rbc +0 -1316
  306. data/vendor/plugins/haml/lib/haml/version.rb +0 -102
  307. data/vendor/plugins/haml/lib/haml/version.rbc +0 -1671
  308. data/vendor/plugins/haml/lib/sass.rb +0 -29
  309. data/vendor/plugins/haml/lib/sass.rbc +0 -492
  310. data/vendor/plugins/haml/lib/sass/callbacks.rb +0 -52
  311. data/vendor/plugins/haml/lib/sass/callbacks.rbc +0 -388
  312. data/vendor/plugins/haml/lib/sass/css.rb +0 -294
  313. data/vendor/plugins/haml/lib/sass/engine.rb +0 -720
  314. data/vendor/plugins/haml/lib/sass/engine.rbc +0 -17020
  315. data/vendor/plugins/haml/lib/sass/environment.rb +0 -143
  316. data/vendor/plugins/haml/lib/sass/environment.rbc +0 -1751
  317. data/vendor/plugins/haml/lib/sass/error.rb +0 -198
  318. data/vendor/plugins/haml/lib/sass/error.rbc +0 -2801
  319. data/vendor/plugins/haml/lib/sass/files.rb +0 -160
  320. data/vendor/plugins/haml/lib/sass/files.rbc +0 -3118
  321. data/vendor/plugins/haml/lib/sass/less.rb +0 -382
  322. data/vendor/plugins/haml/lib/sass/plugin.rb +0 -276
  323. data/vendor/plugins/haml/lib/sass/plugin.rbc +0 -4356
  324. data/vendor/plugins/haml/lib/sass/plugin/configuration.rb +0 -221
  325. data/vendor/plugins/haml/lib/sass/plugin/configuration.rbc +0 -1343
  326. data/vendor/plugins/haml/lib/sass/plugin/generic.rb +0 -15
  327. data/vendor/plugins/haml/lib/sass/plugin/merb.rb +0 -37
  328. data/vendor/plugins/haml/lib/sass/plugin/rack.rb +0 -47
  329. data/vendor/plugins/haml/lib/sass/plugin/rack.rbc +0 -446
  330. data/vendor/plugins/haml/lib/sass/plugin/rails.rb +0 -32
  331. data/vendor/plugins/haml/lib/sass/plugin/rails.rbc +0 -879
  332. data/vendor/plugins/haml/lib/sass/plugin/staleness_checker.rb +0 -123
  333. data/vendor/plugins/haml/lib/sass/plugin/staleness_checker.rbc +0 -2019
  334. data/vendor/plugins/haml/lib/sass/repl.rb +0 -58
  335. data/vendor/plugins/haml/lib/sass/script.rb +0 -63
  336. data/vendor/plugins/haml/lib/sass/script.rbc +0 -1188
  337. data/vendor/plugins/haml/lib/sass/script/bool.rb +0 -18
  338. data/vendor/plugins/haml/lib/sass/script/bool.rbc +0 -366
  339. data/vendor/plugins/haml/lib/sass/script/color.rb +0 -491
  340. data/vendor/plugins/haml/lib/sass/script/color.rbc +0 -8148
  341. data/vendor/plugins/haml/lib/sass/script/css_lexer.rb +0 -29
  342. data/vendor/plugins/haml/lib/sass/script/css_lexer.rbc +0 -809
  343. data/vendor/plugins/haml/lib/sass/script/css_parser.rb +0 -31
  344. data/vendor/plugins/haml/lib/sass/script/css_parser.rbc +0 -628
  345. data/vendor/plugins/haml/lib/sass/script/funcall.rb +0 -77
  346. data/vendor/plugins/haml/lib/sass/script/funcall.rbc +0 -1805
  347. data/vendor/plugins/haml/lib/sass/script/functions.rb +0 -861
  348. data/vendor/plugins/haml/lib/sass/script/functions.rbc +0 -8418
  349. data/vendor/plugins/haml/lib/sass/script/interpolation.rb +0 -70
  350. data/vendor/plugins/haml/lib/sass/script/interpolation.rbc +0 -1225
  351. data/vendor/plugins/haml/lib/sass/script/lexer.rb +0 -337
  352. data/vendor/plugins/haml/lib/sass/script/lexer.rbc +0 -7231
  353. data/vendor/plugins/haml/lib/sass/script/literal.rb +0 -236
  354. data/vendor/plugins/haml/lib/sass/script/literal.rbc +0 -3365
  355. data/vendor/plugins/haml/lib/sass/script/node.rb +0 -112
  356. data/vendor/plugins/haml/lib/sass/script/node.rbc +0 -1418
  357. data/vendor/plugins/haml/lib/sass/script/number.rb +0 -423
  358. data/vendor/plugins/haml/lib/sass/script/number.rbc +0 -6024
  359. data/vendor/plugins/haml/lib/sass/script/operation.rb +0 -95
  360. data/vendor/plugins/haml/lib/sass/script/operation.rbc +0 -1856
  361. data/vendor/plugins/haml/lib/sass/script/parser.rb +0 -401
  362. data/vendor/plugins/haml/lib/sass/script/parser.rbc +0 -8418
  363. data/vendor/plugins/haml/lib/sass/script/string.rb +0 -67
  364. data/vendor/plugins/haml/lib/sass/script/string.rbc +0 -1357
  365. data/vendor/plugins/haml/lib/sass/script/string_interpolation.rb +0 -93
  366. data/vendor/plugins/haml/lib/sass/script/string_interpolation.rbc +0 -1643
  367. data/vendor/plugins/haml/lib/sass/script/unary_operation.rb +0 -57
  368. data/vendor/plugins/haml/lib/sass/script/unary_operation.rbc +0 -1144
  369. data/vendor/plugins/haml/lib/sass/script/variable.rb +0 -48
  370. data/vendor/plugins/haml/lib/sass/script/variable.rbc +0 -844
  371. data/vendor/plugins/haml/lib/sass/scss.rb +0 -17
  372. data/vendor/plugins/haml/lib/sass/scss.rbc +0 -242
  373. data/vendor/plugins/haml/lib/sass/scss/css_parser.rb +0 -46
  374. data/vendor/plugins/haml/lib/sass/scss/css_parser.rbc +0 -1106
  375. data/vendor/plugins/haml/lib/sass/scss/parser.rb +0 -846
  376. data/vendor/plugins/haml/lib/sass/scss/parser.rbc +0 -19348
  377. data/vendor/plugins/haml/lib/sass/scss/rx.rb +0 -126
  378. data/vendor/plugins/haml/lib/sass/scss/rx.rbc +0 -2849
  379. data/vendor/plugins/haml/lib/sass/scss/sass_parser.rb +0 -11
  380. data/vendor/plugins/haml/lib/sass/scss/sass_parser.rbc +0 -287
  381. data/vendor/plugins/haml/lib/sass/scss/script_lexer.rb +0 -15
  382. data/vendor/plugins/haml/lib/sass/scss/script_lexer.rbc +0 -439
  383. data/vendor/plugins/haml/lib/sass/scss/script_parser.rb +0 -25
  384. data/vendor/plugins/haml/lib/sass/scss/script_parser.rbc +0 -482
  385. data/vendor/plugins/haml/lib/sass/scss/static_parser.rb +0 -40
  386. data/vendor/plugins/haml/lib/sass/scss/static_parser.rbc +0 -971
  387. data/vendor/plugins/haml/lib/sass/selector.rb +0 -361
  388. data/vendor/plugins/haml/lib/sass/selector.rbc +0 -4193
  389. data/vendor/plugins/haml/lib/sass/selector/abstract_sequence.rb +0 -62
  390. data/vendor/plugins/haml/lib/sass/selector/abstract_sequence.rbc +0 -798
  391. data/vendor/plugins/haml/lib/sass/selector/comma_sequence.rb +0 -82
  392. data/vendor/plugins/haml/lib/sass/selector/comma_sequence.rbc +0 -1814
  393. data/vendor/plugins/haml/lib/sass/selector/sequence.rb +0 -237
  394. data/vendor/plugins/haml/lib/sass/selector/sequence.rbc +0 -4928
  395. data/vendor/plugins/haml/lib/sass/selector/simple.rb +0 -113
  396. data/vendor/plugins/haml/lib/sass/selector/simple.rbc +0 -1553
  397. data/vendor/plugins/haml/lib/sass/selector/simple_sequence.rb +0 -136
  398. data/vendor/plugins/haml/lib/sass/selector/simple_sequence.rbc +0 -2346
  399. data/vendor/plugins/haml/lib/sass/tree/charset_node.rb +0 -37
  400. data/vendor/plugins/haml/lib/sass/tree/charset_node.rbc +0 -606
  401. data/vendor/plugins/haml/lib/sass/tree/comment_node.rb +0 -128
  402. data/vendor/plugins/haml/lib/sass/tree/comment_node.rbc +0 -2397
  403. data/vendor/plugins/haml/lib/sass/tree/debug_node.rb +0 -36
  404. data/vendor/plugins/haml/lib/sass/tree/debug_node.rbc +0 -740
  405. data/vendor/plugins/haml/lib/sass/tree/directive_node.rb +0 -75
  406. data/vendor/plugins/haml/lib/sass/tree/directive_node.rbc +0 -1302
  407. data/vendor/plugins/haml/lib/sass/tree/extend_node.rb +0 -65
  408. data/vendor/plugins/haml/lib/sass/tree/extend_node.rbc +0 -1276
  409. data/vendor/plugins/haml/lib/sass/tree/for_node.rb +0 -67
  410. data/vendor/plugins/haml/lib/sass/tree/for_node.rbc +0 -1145
  411. data/vendor/plugins/haml/lib/sass/tree/if_node.rb +0 -81
  412. data/vendor/plugins/haml/lib/sass/tree/if_node.rbc +0 -1119
  413. data/vendor/plugins/haml/lib/sass/tree/import_node.rb +0 -102
  414. data/vendor/plugins/haml/lib/sass/tree/import_node.rbc +0 -2242
  415. data/vendor/plugins/haml/lib/sass/tree/mixin_def_node.rb +0 -60
  416. data/vendor/plugins/haml/lib/sass/tree/mixin_def_node.rbc +0 -1001
  417. data/vendor/plugins/haml/lib/sass/tree/mixin_node.rb +0 -123
  418. data/vendor/plugins/haml/lib/sass/tree/mixin_node.rbc +0 -3355
  419. data/vendor/plugins/haml/lib/sass/tree/node.rb +0 -465
  420. data/vendor/plugins/haml/lib/sass/tree/node.rbc +0 -5533
  421. data/vendor/plugins/haml/lib/sass/tree/prop_node.rb +0 -220
  422. data/vendor/plugins/haml/lib/sass/tree/prop_node.rbc +0 -3949
  423. data/vendor/plugins/haml/lib/sass/tree/root_node.rb +0 -157
  424. data/vendor/plugins/haml/lib/sass/tree/root_node.rbc +0 -3112
  425. data/vendor/plugins/haml/lib/sass/tree/rule_node.rb +0 -273
  426. data/vendor/plugins/haml/lib/sass/tree/rule_node.rbc +0 -5636
  427. data/vendor/plugins/haml/lib/sass/tree/variable_node.rb +0 -39
  428. data/vendor/plugins/haml/lib/sass/tree/variable_node.rbc +0 -845
  429. data/vendor/plugins/haml/lib/sass/tree/warn_node.rb +0 -42
  430. data/vendor/plugins/haml/lib/sass/tree/warn_node.rbc +0 -1043
  431. data/vendor/plugins/haml/lib/sass/tree/while_node.rb +0 -48
  432. data/vendor/plugins/haml/lib/sass/tree/while_node.rbc +0 -722
  433. data/vendor/plugins/haml/rails/init.rb +0 -1
  434. data/vendor/plugins/haml/test/benchmark.rb +0 -99
  435. data/vendor/plugins/haml/test/haml/engine_test.rb +0 -1805
  436. data/vendor/plugins/haml/test/haml/erb/_av_partial_1.erb +0 -12
  437. data/vendor/plugins/haml/test/haml/erb/_av_partial_2.erb +0 -8
  438. data/vendor/plugins/haml/test/haml/erb/action_view.erb +0 -62
  439. data/vendor/plugins/haml/test/haml/erb/standard.erb +0 -54
  440. data/vendor/plugins/haml/test/haml/helper_test.rb +0 -450
  441. data/vendor/plugins/haml/test/haml/html2haml/erb_tests.rb +0 -426
  442. data/vendor/plugins/haml/test/haml/html2haml_test.rb +0 -336
  443. data/vendor/plugins/haml/test/haml/markaby/standard.mab +0 -52
  444. data/vendor/plugins/haml/test/haml/mocks/article.rb +0 -6
  445. data/vendor/plugins/haml/test/haml/results/content_for_layout.xhtml +0 -12
  446. data/vendor/plugins/haml/test/haml/results/eval_suppressed.xhtml +0 -9
  447. data/vendor/plugins/haml/test/haml/results/filters.xhtml +0 -62
  448. data/vendor/plugins/haml/test/haml/results/helpers.xhtml +0 -70
  449. data/vendor/plugins/haml/test/haml/results/helpful.xhtml +0 -10
  450. data/vendor/plugins/haml/test/haml/results/just_stuff.xhtml +0 -70
  451. data/vendor/plugins/haml/test/haml/results/list.xhtml +0 -12
  452. data/vendor/plugins/haml/test/haml/results/nuke_inner_whitespace.xhtml +0 -40
  453. data/vendor/plugins/haml/test/haml/results/nuke_outer_whitespace.xhtml +0 -148
  454. data/vendor/plugins/haml/test/haml/results/original_engine.xhtml +0 -20
  455. data/vendor/plugins/haml/test/haml/results/partial_layout.xhtml +0 -5
  456. data/vendor/plugins/haml/test/haml/results/partials.xhtml +0 -21
  457. data/vendor/plugins/haml/test/haml/results/render_layout.xhtml +0 -3
  458. data/vendor/plugins/haml/test/haml/results/silent_script.xhtml +0 -74
  459. data/vendor/plugins/haml/test/haml/results/standard.xhtml +0 -162
  460. data/vendor/plugins/haml/test/haml/results/tag_parsing.xhtml +0 -23
  461. data/vendor/plugins/haml/test/haml/results/very_basic.xhtml +0 -5
  462. data/vendor/plugins/haml/test/haml/results/whitespace_handling.xhtml +0 -89
  463. data/vendor/plugins/haml/test/haml/spec/LICENSE +0 -14
  464. data/vendor/plugins/haml/test/haml/spec/README.md +0 -106
  465. data/vendor/plugins/haml/test/haml/spec/lua_haml_spec.lua +0 -38
  466. data/vendor/plugins/haml/test/haml/spec/perl_haml_test.pl +0 -81
  467. data/vendor/plugins/haml/test/haml/spec/ruby_haml_test.rb +0 -19
  468. data/vendor/plugins/haml/test/haml/spec/tests.json +0 -603
  469. data/vendor/plugins/haml/test/haml/spec_test.rb +0 -44
  470. data/vendor/plugins/haml/test/haml/template_test.rb +0 -417
  471. data/vendor/plugins/haml/test/haml/templates/_av_partial_1.haml +0 -9
  472. data/vendor/plugins/haml/test/haml/templates/_av_partial_1_ugly.haml +0 -9
  473. data/vendor/plugins/haml/test/haml/templates/_av_partial_2.haml +0 -5
  474. data/vendor/plugins/haml/test/haml/templates/_av_partial_2_ugly.haml +0 -5
  475. data/vendor/plugins/haml/test/haml/templates/_layout.erb +0 -3
  476. data/vendor/plugins/haml/test/haml/templates/_layout_for_partial.haml +0 -3
  477. data/vendor/plugins/haml/test/haml/templates/_partial.haml +0 -8
  478. data/vendor/plugins/haml/test/haml/templates/_text_area.haml +0 -3
  479. data/vendor/plugins/haml/test/haml/templates/action_view.haml +0 -47
  480. data/vendor/plugins/haml/test/haml/templates/action_view_ugly.haml +0 -47
  481. data/vendor/plugins/haml/test/haml/templates/breakage.haml +0 -8
  482. data/vendor/plugins/haml/test/haml/templates/content_for_layout.haml +0 -8
  483. data/vendor/plugins/haml/test/haml/templates/eval_suppressed.haml +0 -11
  484. data/vendor/plugins/haml/test/haml/templates/filters.haml +0 -66
  485. data/vendor/plugins/haml/test/haml/templates/helpers.haml +0 -55
  486. data/vendor/plugins/haml/test/haml/templates/helpful.haml +0 -11
  487. data/vendor/plugins/haml/test/haml/templates/just_stuff.haml +0 -85
  488. data/vendor/plugins/haml/test/haml/templates/list.haml +0 -12
  489. data/vendor/plugins/haml/test/haml/templates/nuke_inner_whitespace.haml +0 -32
  490. data/vendor/plugins/haml/test/haml/templates/nuke_outer_whitespace.haml +0 -144
  491. data/vendor/plugins/haml/test/haml/templates/original_engine.haml +0 -17
  492. data/vendor/plugins/haml/test/haml/templates/partial_layout.haml +0 -7
  493. data/vendor/plugins/haml/test/haml/templates/partialize.haml +0 -1
  494. data/vendor/plugins/haml/test/haml/templates/partials.haml +0 -12
  495. data/vendor/plugins/haml/test/haml/templates/render_layout.haml +0 -2
  496. data/vendor/plugins/haml/test/haml/templates/silent_script.haml +0 -40
  497. data/vendor/plugins/haml/test/haml/templates/standard.haml +0 -42
  498. data/vendor/plugins/haml/test/haml/templates/standard_ugly.haml +0 -42
  499. data/vendor/plugins/haml/test/haml/templates/tag_parsing.haml +0 -21
  500. data/vendor/plugins/haml/test/haml/templates/very_basic.haml +0 -4
  501. data/vendor/plugins/haml/test/haml/templates/whitespace_handling.haml +0 -87
  502. data/vendor/plugins/haml/test/haml/util/subset_map_test.rb +0 -91
  503. data/vendor/plugins/haml/test/haml/util_test.rb +0 -268
  504. data/vendor/plugins/haml/test/linked_rails.rb +0 -42
  505. data/vendor/plugins/haml/test/sass/callbacks_test.rb +0 -61
  506. data/vendor/plugins/haml/test/sass/conversion_test.rb +0 -1218
  507. data/vendor/plugins/haml/test/sass/css2sass_test.rb +0 -364
  508. data/vendor/plugins/haml/test/sass/data/hsl-rgb.txt +0 -319
  509. data/vendor/plugins/haml/test/sass/engine_test.rb +0 -2263
  510. data/vendor/plugins/haml/test/sass/extend_test.rb +0 -1348
  511. data/vendor/plugins/haml/test/sass/functions_test.rb +0 -556
  512. data/vendor/plugins/haml/test/sass/less_conversion_test.rb +0 -653
  513. data/vendor/plugins/haml/test/sass/more_results/more1.css +0 -9
  514. data/vendor/plugins/haml/test/sass/more_results/more1_with_line_comments.css +0 -26
  515. data/vendor/plugins/haml/test/sass/more_results/more_import.css +0 -29
  516. data/vendor/plugins/haml/test/sass/more_templates/_more_partial.sass +0 -2
  517. data/vendor/plugins/haml/test/sass/more_templates/more1.sass +0 -23
  518. data/vendor/plugins/haml/test/sass/more_templates/more_import.sass +0 -11
  519. data/vendor/plugins/haml/test/sass/plugin_test.rb +0 -433
  520. data/vendor/plugins/haml/test/sass/results/alt.css +0 -4
  521. data/vendor/plugins/haml/test/sass/results/basic.css +0 -9
  522. data/vendor/plugins/haml/test/sass/results/compact.css +0 -5
  523. data/vendor/plugins/haml/test/sass/results/complex.css +0 -86
  524. data/vendor/plugins/haml/test/sass/results/compressed.css +0 -1
  525. data/vendor/plugins/haml/test/sass/results/expanded.css +0 -19
  526. data/vendor/plugins/haml/test/sass/results/import.css +0 -31
  527. data/vendor/plugins/haml/test/sass/results/import_charset.css +0 -4
  528. data/vendor/plugins/haml/test/sass/results/import_charset_1_8.css +0 -4
  529. data/vendor/plugins/haml/test/sass/results/import_charset_ibm866.css +0 -4
  530. data/vendor/plugins/haml/test/sass/results/line_numbers.css +0 -49
  531. data/vendor/plugins/haml/test/sass/results/mixins.css +0 -95
  532. data/vendor/plugins/haml/test/sass/results/multiline.css +0 -24
  533. data/vendor/plugins/haml/test/sass/results/nested.css +0 -22
  534. data/vendor/plugins/haml/test/sass/results/options.css +0 -1
  535. data/vendor/plugins/haml/test/sass/results/parent_ref.css +0 -13
  536. data/vendor/plugins/haml/test/sass/results/script.css +0 -16
  537. data/vendor/plugins/haml/test/sass/results/scss_import.css +0 -31
  538. data/vendor/plugins/haml/test/sass/results/scss_importee.css +0 -2
  539. data/vendor/plugins/haml/test/sass/results/subdir/nested_subdir/nested_subdir.css +0 -1
  540. data/vendor/plugins/haml/test/sass/results/subdir/subdir.css +0 -3
  541. data/vendor/plugins/haml/test/sass/results/units.css +0 -11
  542. data/vendor/plugins/haml/test/sass/results/warn_imported.css +0 -0
  543. data/vendor/plugins/haml/test/sass/script_conversion_test.rb +0 -314
  544. data/vendor/plugins/haml/test/sass/script_test.rb +0 -470
  545. data/vendor/plugins/haml/test/sass/scss/css_test.rb +0 -916
  546. data/vendor/plugins/haml/test/sass/scss/rx_test.rb +0 -156
  547. data/vendor/plugins/haml/test/sass/scss/scss_test.rb +0 -1088
  548. data/vendor/plugins/haml/test/sass/scss/test_helper.rb +0 -37
  549. data/vendor/plugins/haml/test/sass/templates/_imported_charset_ibm866.sass +0 -4
  550. data/vendor/plugins/haml/test/sass/templates/_imported_charset_utf8.sass +0 -4
  551. data/vendor/plugins/haml/test/sass/templates/_partial.sass +0 -2
  552. data/vendor/plugins/haml/test/sass/templates/alt.sass +0 -16
  553. data/vendor/plugins/haml/test/sass/templates/basic.sass +0 -23
  554. data/vendor/plugins/haml/test/sass/templates/bork1.sass +0 -2
  555. data/vendor/plugins/haml/test/sass/templates/bork2.sass +0 -2
  556. data/vendor/plugins/haml/test/sass/templates/bork3.sass +0 -2
  557. data/vendor/plugins/haml/test/sass/templates/bork4.sass +0 -2
  558. data/vendor/plugins/haml/test/sass/templates/compact.sass +0 -17
  559. data/vendor/plugins/haml/test/sass/templates/complex.sass +0 -305
  560. data/vendor/plugins/haml/test/sass/templates/compressed.sass +0 -15
  561. data/vendor/plugins/haml/test/sass/templates/expanded.sass +0 -17
  562. data/vendor/plugins/haml/test/sass/templates/import.sass +0 -12
  563. data/vendor/plugins/haml/test/sass/templates/import_charset.sass +0 -7
  564. data/vendor/plugins/haml/test/sass/templates/import_charset_1_8.sass +0 -4
  565. data/vendor/plugins/haml/test/sass/templates/import_charset_ibm866.sass +0 -9
  566. data/vendor/plugins/haml/test/sass/templates/importee.less +0 -2
  567. data/vendor/plugins/haml/test/sass/templates/importee.sass +0 -19
  568. data/vendor/plugins/haml/test/sass/templates/line_numbers.sass +0 -13
  569. data/vendor/plugins/haml/test/sass/templates/mixin_bork.sass +0 -5
  570. data/vendor/plugins/haml/test/sass/templates/mixins.sass +0 -76
  571. data/vendor/plugins/haml/test/sass/templates/multiline.sass +0 -20
  572. data/vendor/plugins/haml/test/sass/templates/nested.sass +0 -25
  573. data/vendor/plugins/haml/test/sass/templates/nested_bork1.sass +0 -2
  574. data/vendor/plugins/haml/test/sass/templates/nested_bork2.sass +0 -2
  575. data/vendor/plugins/haml/test/sass/templates/nested_bork3.sass +0 -2
  576. data/vendor/plugins/haml/test/sass/templates/nested_bork4.sass +0 -2
  577. data/vendor/plugins/haml/test/sass/templates/nested_mixin_bork.sass +0 -6
  578. data/vendor/plugins/haml/test/sass/templates/options.sass +0 -2
  579. data/vendor/plugins/haml/test/sass/templates/parent_ref.sass +0 -25
  580. data/vendor/plugins/haml/test/sass/templates/script.sass +0 -101
  581. data/vendor/plugins/haml/test/sass/templates/scss_import.scss +0 -11
  582. data/vendor/plugins/haml/test/sass/templates/scss_importee.scss +0 -1
  583. data/vendor/plugins/haml/test/sass/templates/subdir/nested_subdir/_nested_partial.sass +0 -2
  584. data/vendor/plugins/haml/test/sass/templates/subdir/nested_subdir/nested_subdir.sass +0 -3
  585. data/vendor/plugins/haml/test/sass/templates/subdir/subdir.sass +0 -6
  586. data/vendor/plugins/haml/test/sass/templates/units.sass +0 -11
  587. data/vendor/plugins/haml/test/sass/templates/warn.sass +0 -3
  588. data/vendor/plugins/haml/test/sass/templates/warn_imported.sass +0 -4
  589. data/vendor/plugins/haml/test/test_helper.rb +0 -98
  590. data/vendor/plugins/haml/vendor/fssm/LICENSE +0 -20
  591. data/vendor/plugins/haml/vendor/fssm/README.markdown +0 -55
  592. data/vendor/plugins/haml/vendor/fssm/Rakefile +0 -59
  593. data/vendor/plugins/haml/vendor/fssm/VERSION.yml +0 -5
  594. data/vendor/plugins/haml/vendor/fssm/example.rb +0 -9
  595. data/vendor/plugins/haml/vendor/fssm/fssm.gemspec +0 -77
  596. data/vendor/plugins/haml/vendor/fssm/lib/fssm.rb +0 -33
  597. data/vendor/plugins/haml/vendor/fssm/lib/fssm/backends/fsevents.rb +0 -36
  598. data/vendor/plugins/haml/vendor/fssm/lib/fssm/backends/inotify.rb +0 -26
  599. data/vendor/plugins/haml/vendor/fssm/lib/fssm/backends/polling.rb +0 -25
  600. data/vendor/plugins/haml/vendor/fssm/lib/fssm/backends/rubycocoa/fsevents.rb +0 -131
  601. data/vendor/plugins/haml/vendor/fssm/lib/fssm/monitor.rb +0 -26
  602. data/vendor/plugins/haml/vendor/fssm/lib/fssm/path.rb +0 -91
  603. data/vendor/plugins/haml/vendor/fssm/lib/fssm/pathname.rb +0 -502
  604. data/vendor/plugins/haml/vendor/fssm/lib/fssm/state/directory.rb +0 -57
  605. data/vendor/plugins/haml/vendor/fssm/lib/fssm/state/file.rb +0 -24
  606. data/vendor/plugins/haml/vendor/fssm/lib/fssm/support.rb +0 -63
  607. data/vendor/plugins/haml/vendor/fssm/lib/fssm/tree.rb +0 -176
  608. data/vendor/plugins/haml/vendor/fssm/profile/prof-cache.rb +0 -40
  609. data/vendor/plugins/haml/vendor/fssm/profile/prof-fssm-pathname.html +0 -1231
  610. data/vendor/plugins/haml/vendor/fssm/profile/prof-pathname.rb +0 -68
  611. data/vendor/plugins/haml/vendor/fssm/profile/prof-plain-pathname.html +0 -988
  612. data/vendor/plugins/haml/vendor/fssm/profile/prof.html +0 -2379
  613. data/vendor/plugins/haml/vendor/fssm/spec/path_spec.rb +0 -75
  614. data/vendor/plugins/haml/vendor/fssm/spec/root/duck/quack.txt +0 -0
  615. data/vendor/plugins/haml/vendor/fssm/spec/root/file.css +0 -0
  616. data/vendor/plugins/haml/vendor/fssm/spec/root/file.rb +0 -0
  617. data/vendor/plugins/haml/vendor/fssm/spec/root/file.yml +0 -0
  618. data/vendor/plugins/haml/vendor/fssm/spec/root/moo/cow.txt +0 -0
  619. data/vendor/plugins/haml/vendor/fssm/spec/spec_helper.rb +0 -14
  620. data/vendor/plugins/haml/yard/callbacks.rb +0 -29
  621. data/vendor/plugins/haml/yard/default/fulldoc/html/css/common.sass +0 -26
  622. data/vendor/plugins/haml/yard/default/layout/html/footer.erb +0 -12
  623. data/vendor/plugins/haml/yard/inherited_hash.rb +0 -41
@@ -1,1680 +0,0 @@
1
- # Sass (Syntactically Awesome StyleSheets)
2
-
3
- * Table of contents
4
- {:toc}
5
-
6
- Sass is an extension of CSS
7
- that adds power and elegance to the basic language.
8
- It allows you to use [variables](#variables_), [nested rules](#nested_rules),
9
- [mixins](#mixins), [inline imports](#import), and more,
10
- all with a fully CSS-compatible syntax.
11
- Sass helps keep large stylesheets well-organized,
12
- and get small stylesheets up and running quickly,
13
- particularly with the help of
14
- [the Compass style library](http://compass-style.org).
15
-
16
- ## Features
17
-
18
- * Fully CSS3-compatible
19
- * Language extensions such as variables, nesting, and mixins
20
- * Many {Sass::Script::Functions useful functions} for manipulating colors and other values
21
- * Advanced features like [control directives](#control_directives) for libraries
22
- * Well-formatted, customizable output
23
- * [Firebug integration](https://addons.mozilla.org/en-US/firefox/addon/103988)
24
-
25
- ## Syntax
26
-
27
- There are two syntaxes available for Sass.
28
- The first, known as SCSS (Sassy CSS) and used throughout this reference,
29
- is an extension of the syntax of CSS3.
30
- This means that every valid CSS3 stylesheet
31
- is a valid SCSS file with the same meaning.
32
- In addition, SCSS understands most CSS hacks
33
- and vendor-specific syntax, such as [IE's old `filter` syntax](http://msdn.microsoft.com/en-us/library/ms533754%28VS.85%29.aspx).
34
- This syntax is enhanced with the Sass features described below.
35
- Files using this syntax have the `.scss` extension.
36
-
37
- The second and older syntax, known as the indented syntax (or sometimes just "Sass"),
38
- provides a more concise way of writing CSS.
39
- It uses indentation rather than brackets to indicate nesting of selectors,
40
- and newlines rather than semicolons to separate properties.
41
- Some people find this to be easier to read and quicker to write than SCSS.
42
- The indented syntax has all the same features,
43
- although some of them have slightly different syntax;
44
- this is described in {file:INDENTED_SYNTAX.md the indented syntax reference}.
45
- Files using this syntax have the `.sass` extension.
46
-
47
- Either syntax can [import](#import) files written in the other.
48
- Files can be automatically converted from one syntax to the other
49
- using the `sass-convert` command line tool:
50
-
51
- # Convert Sass to SCSS
52
- $ sass-convert style.sass style.scss
53
-
54
- # Convert SCSS to Sass
55
- $ sass-convert style.scss style.sass
56
-
57
- ## Using Sass
58
-
59
- Sass can be used in three ways:
60
- as a command-line tool,
61
- as a standalone Ruby module,
62
- and as a plugin for any Rack-enabled framework,
63
- including Ruby on Rails and Merb.
64
- Sass is bundled with Haml,
65
- so if the Haml plugin or RubyGem is installed,
66
- Sass will already be installed as a plugin or gem, respectively.
67
- The first step for all of these is to install the Haml gem:
68
-
69
- gem install haml
70
-
71
- If you're using Windows,
72
- you may need to [install Ruby](http://rubyinstaller.org/download.html) first.
73
-
74
- To run Sass from the command line, just use
75
-
76
- sass input.scss output.css
77
-
78
- You can also tell Sass to watch the file and update the CSS
79
- every time the Sass file changes:
80
-
81
- sass --watch input.scss:output.css
82
-
83
- If you have a directory with many Sass files,
84
- you can also tell Sass to watch the entire directory:
85
-
86
- sass --watch app/sass:public/stylesheets
87
-
88
- Use `sass --help` for full documentation.
89
-
90
- Using Sass in Ruby code is very simple.
91
- After installing the Haml gem,
92
- you can use it by running `require "sass"`
93
- and using {Sass::Engine} like so:
94
-
95
- engine = Sass::Engine.new("#main {background-color: #0000ff}", :syntax => :scss)
96
- engine.render #=> "#main { background-color: #0000ff; }\n"
97
-
98
- ### Rack/Rails/Merb Plugin
99
-
100
- To enable Sass in Rails versions before Rails 3,
101
- add the following line to `environment.rb`:
102
-
103
- config.gem "haml"
104
-
105
- For Rails 3, instead add the following line to the Gemfile:
106
-
107
- gem "haml"
108
-
109
- To enable Sass in Merb,
110
- add the following line to `config/dependencies.rb`:
111
-
112
- dependency "merb-haml"
113
-
114
- To enable Sass in a Rack application,
115
- add
116
-
117
- require 'sass/plugin/rack'
118
- use Sass::Plugin::Rack
119
-
120
- to `config.ru`.
121
-
122
- Sass stylesheets don't work the same as views.
123
- They don't contain dynamic content,
124
- so the CSS only needs to be generated when the Sass file has been updated.
125
- By default, `.sass` and `.scss` files are placed in public/stylesheets/sass
126
- (this can be customized with the [`:template_location`](#template_location-option) option).
127
- Then, whenever necessary, they're compiled into corresponding CSS files in public/stylesheets.
128
- For instance, public/stylesheets/sass/main.scss would be compiled to public/stylesheets/main.css.
129
-
130
- ### Caching
131
-
132
- By default, Sass caches compiled templates and [partials](#partials).
133
- This dramatically speeds up re-compilation of large collections of Sass files,
134
- and works best if the Sass templates are split up into separate files
135
- that are all [`@import`](#import)ed into one large file.
136
-
137
- Without a framework, Sass puts the cached templates in the `.sass-cache` directory.
138
- In Rails and Merb, they go in `tmp/sass-cache`.
139
- The directory can be customized with the [`:cache_location`](#cache_location-option) option.
140
- If you don't want Sass to use caching at all,
141
- set the [`:cache`](#cache-option) option to `false`.
142
-
143
- ### Options
144
-
145
- Options can be set by setting the {Sass::Plugin#options Sass::Plugin.options} hash
146
- in `environment.rb` in Rails or `config.ru` in Rack...
147
-
148
- Sass::Plugin.options[:style] = :compact
149
-
150
- ...or by setting the `Merb::Plugin.config[:sass]` hash in `init.rb` in Merb...
151
-
152
- Merb::Plugin.config[:sass][:style] = :compact
153
-
154
- ...or by passing an options hash to {Sass::Engine#initialize}.
155
- All relevant options are also available via flags
156
- to the `sass` command-line executable.
157
- Available options are:
158
-
159
- {#style-option} `:style`
160
- : Sets the style of the CSS output.
161
- See [Output Style](#output_style).
162
-
163
- {#syntax-option} `:syntax`
164
- : The syntax of the input file, `:sass` for the indented syntax
165
- and `:scss` for the CSS-extension syntax.
166
- This is only useful when you're constructing {Sass::Engine} instances yourself;
167
- it's automatically set properly when using {Sass::Plugin}.
168
- Defaults to `:sass`.
169
-
170
- {#property_syntax-option} `:property_syntax`
171
- : Forces indented-syntax documents to use one syntax for properties.
172
- If the correct syntax isn't used, an error is thrown.
173
- `:new` forces the use of a colon or equals sign
174
- after the property name.
175
- For example: `color: #0f3`
176
- or `width: $main_width`.
177
- `:old` forces the use of a colon
178
- before the property name.
179
- For example: `:color #0f3`
180
- or `:width $main_width`.
181
- By default, either syntax is valid.
182
- This has no effect on SCSS documents.
183
-
184
- {#cache-option} `:cache`
185
- : Whether parsed Sass files should be cached,
186
- allowing greater speed. Defaults to true.
187
-
188
- {#read_cache-option} `:read_cache`
189
- : If this is set and `:cache` is not,
190
- only read the Sass cache if it exists,
191
- don't write to it if it doesn't.
192
-
193
- {#never_update-option} `:never_update`
194
- : Whether the CSS files should never be updated,
195
- even if the template file changes.
196
- Setting this to true may give small performance gains.
197
- It always defaults to false.
198
- Only has meaning within Rack, Ruby on Rails, or Merb.
199
-
200
- {#always_update-option} `:always_update`
201
- : Whether the CSS files should be updated every
202
- time a controller is accessed,
203
- as opposed to only when the template has been modified.
204
- Defaults to false.
205
- Only has meaning within Rack, Ruby on Rails, or Merb.
206
-
207
- {#always_check-option} `:always_check`
208
- : Whether a Sass template should be checked for updates every
209
- time a controller is accessed,
210
- as opposed to only when the server starts.
211
- If a Sass template has been updated,
212
- it will be recompiled and will overwrite the corresponding CSS file.
213
- Defaults to false in production mode, true otherwise.
214
- Only has meaning within Rack, Ruby on Rails, or Merb.
215
-
216
- {#full_exception-option} `:full_exception`
217
- : Whether an error in the Sass code
218
- should cause Sass to provide a detailed description
219
- within the generated CSS file.
220
- If set to true, the error will be displayed
221
- along with a line number and source snippet
222
- both as a comment in the CSS file
223
- and at the top of the page (in supported browsers).
224
- Otherwise, an exception will be raised in the Ruby code.
225
- Defaults to false in production mode, true otherwise.
226
- Only has meaning within Rack, Ruby on Rails, or Merb.
227
-
228
- {#template_location-option} `:template_location`
229
- : A path to the root sass template directory for your application.
230
- If a hash, `:css_location` is ignored and this option designates
231
- a mapping between input and output directories.
232
- May also be given a list of 2-element lists, instead of a hash.
233
- Defaults to `css_location + "/sass"`.
234
- Only has meaning within Rack, Ruby on Rails, or Merb.
235
- Note that if multiple template locations are specified, all
236
- of them are placed in the import path, allowing you to import
237
- between them.
238
- **Note that due to the many possible formats it can take,
239
- this option should only be set directly, not accessed or modified.
240
- Use the {Sass::Plugin#template_location_array},
241
- {Sass::Plugin#add_template_location},
242
- and {Sass::Plugin#remove_template_location} methods instead**.
243
-
244
- {#css_location-option} `:css_location`
245
- : The path where CSS output should be written to.
246
- This option is ignored when `:template_location` is a Hash.
247
- Defaults to `"./public/stylesheets"`.
248
- Only has meaning within Rack, Ruby on Rails, or Merb.
249
-
250
- {#cache_location-option} `:cache_location`
251
- : The path where the cached `sassc` files should be written to.
252
- Defaults to `"./tmp/sass-cache"` in Rails and Merb,
253
- or `"./.sass-cache"` otherwise.
254
-
255
- {#unix_newlines-option} `:unix_newlines`
256
- : If true, use Unix-style newlines when writing files.
257
- Only has meaning on Windows, and only when Sass is writing the files
258
- (in Rack, Rails, or Merb, when using {Sass::Plugin} directly,
259
- or when using the command-line executable).
260
-
261
- {#filename-option} `:filename`
262
- : The filename of the file being rendered.
263
- This is used solely for reporting errors,
264
- and is automatically set when using Rack, Rails, or Merb.
265
-
266
- {#line-option} `:line`
267
- : The number of the first line of the Sass template.
268
- Used for reporting line numbers for errors.
269
- This is useful to set if the Sass template is embedded in a Ruby file.
270
-
271
- {#load_paths-option} `:load_paths`
272
- : An array of filesystem paths which should be searched
273
- for Sass templates imported with the [`@import`](#import) directive.
274
- This defaults to the working directory and, in Rack, Rails, or Merb,
275
- whatever `:template_location` is.
276
-
277
- {#line_numbers-option} `:line_numbers`
278
- : When set to true, causes the line number and file
279
- where a selector is defined to be emitted into the compiled CSS
280
- as a comment. Useful for debugging, especially when using imports
281
- and mixins.
282
- This option may also be called `:line_comments`.
283
- Automatically disabled when using the `:compressed` output style
284
- or the `:debug_info` option.
285
-
286
- {#debug_info-option} `:debug_info`
287
- : When set to true, causes the line number and file
288
- where a selector is defined to be emitted into the compiled CSS
289
- in a format that can be understood by the browser.
290
- Useful in conjunction with [the FireSass Firebug extension](https://addons.mozilla.org/en-US/firefox/addon/103988)
291
- for displaying the Sass filename and line number.
292
- Automatically disabled when using the `:compressed` output style.
293
-
294
- {#custom-option} `:custom`
295
- : An option that's available for individual applications to set
296
- to make data available to {Sass::Script::Functions custom Sass functions}.
297
-
298
- {#sass2-option} `:sass2`
299
- : Parses the document using semantics closer to that of Sass v2.
300
- Currently, this just means that strings in mixin arguments
301
- are treated as though they were in [an `=` context](#sass-script-strings).
302
-
303
- {#quiet-option} `:quiet`
304
- : When set to true, causes warnings to be disabled.
305
-
306
- ### Encodings
307
-
308
- When running on Ruby 1.9 and later, Sass is aware of the character encoding of documents
309
- and will handle them the same way that CSS would.
310
- By default, Sass assumes that all stylesheets are encoded
311
- using whatever coding system your operating system defaults to.
312
- For many users this will be `UTF-8`, the de facto standard for the web.
313
- For some users, though, it may be a more local encoding.
314
-
315
- If you want to use a different encoding for your stylesheet
316
- than your operating system default,
317
- you can use the `@charset` declaration just like in CSS.
318
- Add `@charset "encoding-name";` at the beginning of the stylesheet
319
- (before any whitespace or comments)
320
- and Sass will interpret it as the given encoding.
321
- Note that whatever encoding you use, it must be convertible to Unicode.
322
-
323
- Sass will also respect any Unicode BOMs and non-ASCII-compatible Unicode encodings
324
- [as specified by the CSS spec](http://www.w3.org/TR/CSS2/syndata.html#charset),
325
- although this is *not* the recommended way
326
- to specify the character set for a document.
327
- Note that Sass does not support the obscure `UTF-32-2143`,
328
- `UTF-32-3412`, `EBCDIC`, `IBM1026`, and `GSM 03.38` encodings,
329
- since Ruby does not have support for them
330
- and they're highly unlikely to ever be used in practice.
331
-
332
- #### Output Encoding
333
-
334
- In general, Sass will try to encode the output stylesheet
335
- using the same encoding as the input stylesheet.
336
- In order for it to do this, though, the input stylesheet must have a `@charset` declaration;
337
- otherwise, Sass will default to encoding the output stylesheet as UTF-8.
338
- In addition, it will add a `@charset` declaration to the output
339
- if it's not plain ASCII.
340
-
341
- When other stylesheets with `@charset` declarations are `@import`ed,
342
- Sass will convert them to the same encoding as the main stylesheet.
343
-
344
- Note that Ruby 1.8 does not have good support for character encodings,
345
- and so Sass behaves somewhat differently when running under it than under Ruby 1.9 and later.
346
- In Ruby 1.8, Sass simply uses the first `@charset` declaration in the stylesheet
347
- or any of the other stylesheets it `@import`s.
348
-
349
- ## CSS Extensions
350
-
351
- ### Nested Rules
352
-
353
- Sass allows CSS rules to be nested within one another.
354
- The inner rule then only applies within the outer rule's selector.
355
- For example:
356
-
357
- #main p {
358
- color: #00ff00;
359
- width: 97%;
360
-
361
- .redbox {
362
- background-color: #ff0000;
363
- color: #000000;
364
- }
365
- }
366
-
367
- is compiled to:
368
-
369
- #main p {
370
- color: #00ff00;
371
- width: 97%; }
372
- #main p .redbox {
373
- background-color: #ff0000;
374
- color: #000000; }
375
-
376
- This helps avoid repetition of parent selectors,
377
- and makes complex CSS layouts with lots of nested selectors much simpler.
378
- For example:
379
-
380
- #main {
381
- width: 97%;
382
-
383
- p, div {
384
- font-size: 2em;
385
- a { font-weight: bold; }
386
- }
387
-
388
- pre { font-size: 3em; }
389
- }
390
-
391
- is compiled to:
392
-
393
- #main {
394
- width: 97%; }
395
- #main p, #main div {
396
- font-size: 2em; }
397
- #main p a, #main div a {
398
- font-weight: bold; }
399
- #main pre {
400
- font-size: 3em; }
401
-
402
- ### Referencing Parent Selectors: `&`
403
-
404
- Sometimes it's useful to use a nested rule's parent selector
405
- in other ways than the default.
406
- For instance, you might want to have special styles
407
- for when that selector is hovered over
408
- or for when the body element has a certain class.
409
- In these cases, you can explicitly specify where the parent selector
410
- should be inserted using the `&` character.
411
- For example:
412
-
413
- a {
414
- font-weight: bold;
415
- text-decoration: none;
416
- &:hover { text-decoration: underline; }
417
- body.firefox & { font-weight: normal; }
418
- }
419
-
420
- is compiled to:
421
-
422
- a {
423
- font-weight: bold;
424
- text-decoration: none; }
425
- a:hover {
426
- text-decoration: underline; }
427
- body.firefox a {
428
- font-weight: normal; }
429
-
430
- `&` will be replaced with the parent selector as it appears in the CSS.
431
- This means that if you have a deeply nested rule,
432
- the parent selector will be fully resolved
433
- before the `&` is replaced.
434
- For example:
435
-
436
- #main {
437
- color: black;
438
- a {
439
- font-weight: bold;
440
- &:hover { color: red; }
441
- }
442
- }
443
-
444
- is compiled to:
445
-
446
- #main {
447
- color: black; }
448
- #main a {
449
- font-weight: bold; }
450
- #main a:hover {
451
- color: red; }
452
-
453
- ### Nested Properties
454
-
455
- CSS has quite a few properties that are in "namespaces;"
456
- for instance, `font-family`, `font-size`, and `font-weight`
457
- are all in the `font` namespace.
458
- In CSS, if you want to set a bunch of properties in the same namespace,
459
- you have to type it out each time.
460
- Sass provides a shortcut for this:
461
- just write the namespace one,
462
- then nest each of the sub-properties within it.
463
- For example:
464
-
465
- .funky {
466
- font: {
467
- family: fantasy;
468
- size: 30em;
469
- weight: bold;
470
- }
471
- }
472
-
473
- is compiled to:
474
-
475
- .funky {
476
- font-family: fantasy;
477
- font-size: 30em;
478
- font-weight: bold; }
479
-
480
- The property namespace itself can also have a value.
481
- For example:
482
-
483
- .funky {
484
- font: 2px/3px {
485
- family: fantasy;
486
- size: 30em;
487
- weight: bold;
488
- }
489
- }
490
-
491
- is compiled to:
492
-
493
- .funky {
494
- font: 2px/3px;
495
- font-family: fantasy;
496
- font-size: 30em;
497
- font-weight: bold; }
498
-
499
- ## Comments: `/* */` and `//` {#comments}
500
-
501
- Sass supports standard multiline CSS comments with `/* */`,
502
- as well as single-line comments with `//`.
503
- The multiline comments are preserved in the CSS output where possible,
504
- while the single-line comments are removed.
505
- For example:
506
-
507
- /* This comment is
508
- * several lines long.
509
- * since it uses the CSS comment syntax,
510
- * it will appear in the CSS output. */
511
- body { color: black; }
512
-
513
- // These comments are only one line long each.
514
- // They won't appear in the CSS output,
515
- // since they use the single-line comment syntax.
516
- a { color: green; }
517
-
518
- is compiled to:
519
-
520
- /* This comment is
521
- * several lines long.
522
- * since it uses the CSS comment syntax,
523
- * it will appear in the CSS output. */
524
- body {
525
- color: black; }
526
-
527
- a {
528
- color: green; }
529
-
530
- ## SassScript {#sassscript}
531
-
532
- In addition to the plain CSS property syntax,
533
- Sass supports a small set of extensions called SassScript.
534
- SassScript allows properties to use
535
- variables, arithmetic, and extra functions.
536
- SassScript can be used in any property value.
537
-
538
- SassScript can also be used to generate selectors and property names,
539
- which is useful when writing [mixins](#mixins).
540
- This is done via [interpolation](#interpolation_).
541
-
542
- ### Interactive Shell
543
-
544
- You can easily experiment with SassScript using the interactive shell.
545
- To launch the shell run the sass command-line with the `-i` option. At the
546
- prompt, enter any legal SassScript expression to have it evaluated
547
- and the result printed out for you:
548
-
549
- $ sass -i
550
- >> "Hello, Sassy World!"
551
- "Hello, Sassy World!"
552
- >> 1px + 1px + 1px
553
- 3px
554
- >> #777 + #777
555
- #eeeeee
556
- >> #777 + #888
557
- white
558
-
559
- ### Variables: `$` {#variables_}
560
-
561
- The most straightforward way to use SassScript
562
- is to use variables.
563
- Variables begin with dollar signs,
564
- and are set like CSS properties:
565
-
566
- $width: 5em;
567
-
568
- You can then refer to them in properties:
569
-
570
- #main {
571
- width: $width;
572
- }
573
-
574
- Variables are only available within the level of nested selectors
575
- where they're defined.
576
- If they're defined outside of any nested selectors,
577
- they're available everywhere.
578
-
579
- Variables used to use the prefix character `!`;
580
- this still works, but it's deprecated and prints a warning.
581
- `$` is the recommended syntax.
582
-
583
- Variables also used to be defined with `=` rather than `:`;
584
- this still works, but it's deprecated and prints a warning.
585
- `:` is the recommended syntax.
586
-
587
- ### Data Types
588
-
589
- SassScript supports four main data types:
590
-
591
- * numbers (e.g. `1.2`, `13`, `10px`)
592
- * strings of text, with and without quotes (e.g. `"foo"`, `'bar'`, `baz`)
593
- * colors (e.g. `blue`, `#04a3f9`, `rgba(255, 0, 0, 0.5)`)
594
- * booleans (e.g. `true`, `false`)
595
-
596
- SassScript also supports all other types of CSS property value,
597
- such as Unicode ranges and `!important` declarations.
598
- However, it has no special handling for these types.
599
- They're treated just like unquoted strings.
600
-
601
- #### Strings {#sass-script-strings}
602
-
603
- CSS specifies two kinds of strings: those with quotes,
604
- such as `"Lucida Grande"` or `'http://sass-lang.com'`,
605
- and those without quotes, such as `sans-serif` or `bold`.
606
- SassScript recognizes both kinds,
607
- and in general if one kind of string is used in the Sass document,
608
- that kind of string will be used in the resulting CSS.
609
-
610
- There is one exception to this, though:
611
- when using [`#{}` interpolation](#interpolation_),
612
- quoted strings are unquoted.
613
- This makes it easier to use e.g. selector names in [mixins](#mixins).
614
- For example:
615
-
616
- @mixin firefox-message($selector) {
617
- body.firefox #{$selector}:before {
618
- content: "Hi, Firefox users!"; } }
619
-
620
- @include firefox-message(".header");
621
-
622
- is compiled to:
623
-
624
- body.firefox .header:before {
625
- content: "Hi, Firefox users!"; }
626
-
627
- It's also worth noting that when using the [deprecated `=` property syntax](#sassscript),
628
- all strings are interpreted as unquoted,
629
- regardless of whether or not they're written with quotes.
630
-
631
- ### Operations
632
-
633
- All types support equality operations (`==` and `!=`).
634
- In addition, each type has its own operations
635
- that it has special support for.
636
-
637
- #### Number Operations
638
-
639
- SassScript supports the standard arithmetic operations on numbers
640
- (`+`, `-`, `*`, `/`, `%`),
641
- and will automatically convert between units if it can:
642
-
643
- p {
644
- width: 1in + 8pt;
645
- }
646
-
647
- is compiled to:
648
-
649
- p {
650
- width: 1.111in; }
651
-
652
- Relational operators
653
- (`<`, `>`, `<=`, `>=`)
654
- are also supported for numbers,
655
- and equality operators
656
- (`==`, `!=`)
657
- are supported for all types.
658
-
659
- ##### Division and `/`
660
- {#division-and-slash}
661
-
662
- CSS allows `/` to appear in property values
663
- as a way of separating numbers.
664
- Since SassScript is an extension of the CSS property syntax,
665
- it must support this, while also allowing `/` to be used for division.
666
- This means that by default, if two numbers are separated by `/` in SassScript,
667
- then they will appear that way in the resulting CSS.
668
-
669
- However, there are three situations where the `/` will be interpreted as division.
670
- These cover the vast majority of cases where division is actually used.
671
- They are:
672
-
673
- 1. If the value, or any part of it, is stored in a variable.
674
- 2. If the value is surrounded by parentheses.
675
- 3. If the value is used as part of another arithmetic expression.
676
-
677
- For example:
678
-
679
- p {
680
- font: 10px/8px; // Plain CSS, no division
681
- $width: 1000px;
682
- width: $width/2; // Uses a variable, does division
683
- height: (500px/2); // Uses parentheses, does division
684
- margin-left: 5px + 8px/2px; // Uses +, does division
685
- }
686
-
687
- is compiled to:
688
-
689
- p {
690
- font: 10px/8px;
691
- width: 500px;
692
- height: 250px;
693
- margin-left: 9px; }
694
-
695
- If you want to use variables along with a plain CSS `/`,
696
- you can use `#{}` to insert them.
697
- For example:
698
-
699
- p {
700
- $font-size: 12px;
701
- $line-height: 30px;
702
- font: #{$font-size}/#{$line-height};
703
- }
704
-
705
- is compiled to:
706
-
707
- p {
708
- font: 12px/30px;
709
- }
710
-
711
- #### Color Operations
712
-
713
- All arithmetic operations are supported for color values,
714
- where they work piecewise.
715
- This means that the operation is performed
716
- on the red, green, and blue components in turn.
717
- For example:
718
-
719
- p {
720
- color: #010203 + #040506;
721
- }
722
-
723
- computes `01 + 04 = 05`, `02 + 05 = 07`, and `03 + 06 = 09`,
724
- and is compiled to:
725
-
726
- p {
727
- color: #050709; }
728
-
729
- Often it's more useful to use {Sass::Script::Functions color functions}
730
- than to try to use color arithmetic to achieve the same effect.
731
-
732
- Arithmetic operations also work between numbers and colors,
733
- also piecewise.
734
- For example:
735
-
736
- p {
737
- color: #010203 * 2;
738
- }
739
-
740
- computes `01 * 2 = 02`, `02 * 2 = 04`, and `03 * 2 = 06`,
741
- and is compiled to:
742
-
743
- p {
744
- color: #020406; }
745
-
746
- Note that colors with an alpha channel
747
- (those created with the {Sass::Script::Functions#rgba rgba}
748
- or {Sass::Script::Functions#hsla hsla} functions)
749
- must have the same alpha value in order for color arithmetic
750
- to be done with them.
751
- The arithmetic doesn't affect the alpha value.
752
- For example:
753
-
754
- p {
755
- color: rgba(255, 0, 0, 0.75) + rgba(0, 255, 0, 0.75);
756
- }
757
-
758
- is compiled to:
759
-
760
- p {
761
- color: rgba(255, 255, 0, 0.75); }
762
-
763
- The alpha channel of a color can be adjusted using the
764
- {Sass::Script::Functions#opacify opacify} and
765
- {Sass::Script::Functions#transparentize transparentize} functions.
766
- For example:
767
-
768
- $translucent-red: rgba(255, 0, 0, 0.5);
769
- p {
770
- color: opacify($translucent-red, 0.8);
771
- background-color: transparentize($translucent-red, 50%);
772
- }
773
-
774
- is compiled to:
775
-
776
- p {
777
- color: rgba(255, 0, 0, 0.9);
778
- background-color: rgba(255, 0, 0, 0.25); }
779
-
780
- #### String Operations
781
-
782
- The `+` operation can be used to concatenate strings:
783
-
784
- p {
785
- cursor: e + -resize;
786
- }
787
-
788
- is compiled to:
789
-
790
- p {
791
- cursor: e-resize; }
792
-
793
- Note that if a quoted string is added to an unquoted string
794
- (that is, the quoted string is to the left of the `+`),
795
- the result is a quoted string.
796
- Likewise, if an unquoted string is added to a quoted string
797
- (the unquoted string is to the left of the `+`),
798
- the result is an unquoted string.
799
- For example:
800
-
801
- p:before {
802
- content: "Foo " + Bar;
803
- font-family: sans- + "serif"; }
804
-
805
- is compiled to:
806
-
807
- p:before {
808
- content: "Foo Bar";
809
- font-family: sans-serif; }
810
-
811
- By default, if two values are placed next to one another,
812
- they are concatenated with a space:
813
-
814
- p {
815
- margin: 3px + 4px auto;
816
- }
817
-
818
- is compiled to:
819
-
820
- p {
821
- margin: 7px auto; }
822
-
823
- Within a string of text, #{} style interpolation can be used to
824
- place dynamic values within the string:
825
-
826
- p:before {
827
- content: "I ate #{5 + 10} pies!"; }
828
-
829
- is compiled to:
830
-
831
- p:before {
832
- content: "I ate 15 pies!"; }
833
-
834
- #### Boolean Operations
835
-
836
- SassScript supports `and`, `or`, and `not` operators
837
- for boolean values.
838
-
839
- ### Parentheses
840
-
841
- Parentheses can be used to affect the order of operations:
842
-
843
- p {
844
- width: 1em + (2em * 3);
845
- }
846
-
847
- is compiled to:
848
-
849
- p {
850
- width: 7em; }
851
-
852
- ### Functions
853
-
854
- SassScript defines some useful functions
855
- that are called using the normal CSS function syntax:
856
-
857
- p {
858
- color: hsl(0, 100%, 0.5);
859
- }
860
-
861
- is compiled to:
862
-
863
- p {
864
- color: #ff0000; }
865
-
866
- See {Sass::Script::Functions} for a full listing of Sass functions,
867
- as well as instructions on defining your own in Ruby.
868
-
869
- ### Interpolation: `#{}` {#interpolation_}
870
-
871
- You can also use SassScript variables in selectors
872
- and property names using #{} interpolation syntax:
873
-
874
- $name: foo;
875
- $attr: border;
876
- p.#{$name} { #{$attr}-color: blue }
877
-
878
- is compiled to:
879
-
880
- p.foo {
881
- border-color: blue; }
882
-
883
- It's also possible to use `#{}` to put SassScript into property values.
884
- In most cases this isn't any better than using a variable,
885
- but using `#{}` does mean that any operations near it
886
- will be treated as plain CSS.
887
- For example:
888
-
889
- p {
890
- $font-size: 12px;
891
- $line-height: 30px;
892
- font: #{$font-size}/#{$line-height};
893
- }
894
-
895
- is compiled to:
896
-
897
- p {
898
- font: 12px/30px;
899
- }
900
-
901
- ### Variable Defaults: `!default`
902
-
903
- You can assign to variables if they aren't already assigned
904
- by adding the `!default` flag to the end of the value.
905
- This means that if the variable has already been assigned to,
906
- it won't be re-assigned,
907
- but if it doesn't have a value yet, it will be given one.
908
-
909
- For example:
910
-
911
- $content: "First content";
912
- $content: "Second content?" !default;
913
- $new_content: "First time reference" !default;
914
-
915
- #main {
916
- content: $content;
917
- new-content: $new_content;
918
- }
919
-
920
- is compiled to:
921
-
922
- #main {
923
- content: "First content";
924
- new-content: "First time reference"; }
925
-
926
- ## `@`-Rules and Directives {#directives}
927
-
928
- Sass supports all CSS3 `@`-rules,
929
- as well as some additional Sass-specific ones
930
- known as "directives."
931
- These have various effects in Sass, detailed below.
932
- See also [control directives](#control-directives)
933
- and [mixin directives](#mixins).
934
-
935
- ### `@import` {#import}
936
-
937
- Sass extends the CSS `@import` rule
938
- to allow it to import SCSS and Sass files.
939
- All imported SCSS and Sass files will be merged together
940
- into a single CSS output file.
941
- In addition, any variables or [mixins](#mixins)
942
- defined in imported files can be used in the main file.
943
-
944
- Sass looks for other Sass files in the current directory,
945
- and the Sass file directory under Rack, Rails, or Merb.
946
- Additional search directories may be specified
947
- using the [`:load_paths`](#load_paths-option) option,
948
- or the `--load-path` option on the command line.
949
-
950
- `@import` takes a filename to import.
951
- By default, it looks for a Sass file to import directly,
952
- but there are a few circumstances under which it will compile to a CSS `@import` rule:
953
-
954
- * If the file's extension is `.css`.
955
- * If the filename begins with `http://`.
956
- * If the filename is a `url()`.
957
- * If the `@import` has any media queries.
958
-
959
- If none of the above conditions are met
960
- and the extension is `.scss` or `.sass`,
961
- then the named Sass or SCSS file will be imported.
962
- If there is no extension,
963
- Sass will try to find a file with that name and the `.scss` or `.sass` extension
964
- and import it.
965
-
966
- For example,
967
-
968
- @import "foo.scss";
969
-
970
- or
971
-
972
- @import "foo";
973
-
974
- would both import the file `foo.scss`,
975
- whereas
976
-
977
- @import "foo.css";
978
- @import "foo" screen;
979
- @import "http://foo.com/bar";
980
- @import url(foo);
981
-
982
- would all compile to
983
-
984
- @import "foo.css";
985
- @import "foo" screen;
986
- @import "http://foo.com/bar";
987
- @import url(foo);
988
-
989
- It's also possible to import multiple files in one `@import`. For example:
990
-
991
- @import "rounded-corners", "text-shadow";
992
-
993
- would import both the `rounded-corners` and the `text-shadow` files.
994
-
995
- #### Partials {#partials}
996
-
997
- If you have a SCSS or Sass file that you want to import
998
- but don't want to compile to a CSS file,
999
- you can add an underscore to the beginning of the filename.
1000
- This will tell Sass not to compile it to a normal CSS file.
1001
- You can then import these files without using the underscore.
1002
-
1003
- For example, you might have `_colors.scss`.
1004
- Then no `_colors.css` file would be created,
1005
- and you can do
1006
-
1007
- @import "colors";
1008
-
1009
- and `_colors.scss` would be imported.
1010
-
1011
- ### `@extend` {#extend}
1012
-
1013
- There are often cases when designing a page
1014
- when one class should have all the styles of another class,
1015
- as well as its own specific styles.
1016
- The most common way of handling this is to use both the more general class
1017
- and the more specific class in the HTML.
1018
- For example, suppose we have a design for a normal error
1019
- and also for a serious error. We might write our markup like so:
1020
-
1021
- <div class="error seriousError">
1022
- Oh no! You've been hacked!
1023
- </div>
1024
-
1025
- And our styles like so:
1026
-
1027
- .error {
1028
- border: 1px #f00;
1029
- background-color: #fdd;
1030
- }
1031
- .seriousError {
1032
- border-width: 3px;
1033
- }
1034
-
1035
- Unfortunately, this means that we have to always remember
1036
- to use `.error` with `.seriousError`.
1037
- This is a maintenance burden, leads to tricky bugs,
1038
- and can bring non-semantic style concerns into the markup.
1039
-
1040
- The `@extend` directive avoids these problems
1041
- by telling Sass that one selector should inherit the styles of another selector.
1042
- For example:
1043
-
1044
- .error {
1045
- border: 1px #f00;
1046
- background-color: #fdd;
1047
- }
1048
- .seriousError {
1049
- @extend .error;
1050
- border-width: 3px;
1051
- }
1052
-
1053
- This means that all styles defined for `.error`
1054
- are also applied to `.seriousError`,
1055
- in addition to the styles specific to `.seriousError`.
1056
- In effect, everything with class `.seriousError` also has class `.error`.
1057
-
1058
- Other rules that use `.error` will work for `.seriousError` as well.
1059
- For example, if we have special styles for errors caused by hackers:
1060
-
1061
- .error.intrusion {
1062
- background-image: url("/image/hacked.png");
1063
- }
1064
-
1065
- Then `<div class="seriousError intrusion">`
1066
- will have the `hacked.png` background image as well.
1067
-
1068
- #### How it Works
1069
-
1070
- `@extend` works by inserting the extending selector (e.g. `.seriousError`)
1071
- anywhere in the stylesheet that the extended selector (.e.g `.error`) appears.
1072
- Thus the example above:
1073
-
1074
- .error {
1075
- border: 1px #f00;
1076
- background-color: #fdd;
1077
- }
1078
- .error.intrusion {
1079
- background-image: url("/image/hacked.png");
1080
- }
1081
- .seriousError {
1082
- @extend .error;
1083
- border-width: 3px;
1084
- }
1085
-
1086
- is compiled to:
1087
-
1088
- .error, .seriousError {
1089
- border: 1px #f00;
1090
- background-color: #fdd; }
1091
-
1092
- .error.intrusion, .seriousError.intrusion {
1093
- background-image: url("/image/hacked.png"); }
1094
-
1095
- .seriousError {
1096
- border-width: 3px; }
1097
-
1098
- When merging selectors, `@extend` is smart enough
1099
- to avoid unnecessary duplication,
1100
- so something like `.seriousError.seriousError` gets translated to `.seriousError`.
1101
- In addition, it won't produce selectors that can't match anything, like `#main#footer`.
1102
-
1103
- #### Extending Complex Selectors
1104
-
1105
- Class selectors aren't the only things that can be extended.
1106
- It's possible to extend any selector involving only a single element,
1107
- such as `.special.cool`, `a:hover`, or `a.user[href^="http://"]`.
1108
- For example:
1109
-
1110
- .hoverlink {@extend a:hover}
1111
-
1112
- Just like with classes, this means that all styles defined for `a:hover`
1113
- are also applied to `.hoverlink`.
1114
- For example:
1115
-
1116
- .hoverlink {@extend a:hover}
1117
- a:hover {text-decoration: underline}
1118
-
1119
- is compiled to:
1120
-
1121
- a:hover, .hoverlink {text-decoration: underline}
1122
-
1123
- Just like with `.error.intrusion` above,
1124
- any rule that uses `a:hover` will also work for `.hoverlink`,
1125
- even if they have other selectors as well.
1126
- For example:
1127
-
1128
- .hoverlink {@extend a:hover}
1129
- .comment a.user:hover {font-weight: bold}
1130
-
1131
- is compiled to:
1132
-
1133
- .comment a.user:hover, .comment .hoverlink.user {font-weight: bold}
1134
-
1135
- #### Multiple Extends
1136
-
1137
- A single selector can extend more than one selector.
1138
- This means that it inherits the styles of all the extended selectors.
1139
- For example:
1140
-
1141
- .error {
1142
- border: 1px #f00;
1143
- background-color: #fdd;
1144
- }
1145
- .attention {
1146
- font-size: 3em;
1147
- background-color: #ff0;
1148
- }
1149
- .seriousError {
1150
- @extend .error;
1151
- @extend .attention;
1152
- border-width: 3px;
1153
- }
1154
-
1155
- is compiled to:
1156
-
1157
- .error, .seriousError {
1158
- border: 1px #f00;
1159
- background-color: #fdd; }
1160
-
1161
- .attention, .seriousError {
1162
- font-size: 3em;
1163
- background-color: #ff0; }
1164
-
1165
- .seriousError {
1166
- border-width: 3px; }
1167
-
1168
- In effect, everything with class `.seriousError`
1169
- also has class `.error` *and* class `.attention`.
1170
- Thus, the styles defined later in the document take precedence:
1171
- `.seriousError` has background color `#ff0` rather than `#fdd`,
1172
- since `.attention` is defined later than `.error`.
1173
-
1174
- #### Chaining Extends
1175
-
1176
- It's possible for one selector to extend another selector
1177
- that in turn extends a third.
1178
- For example:
1179
-
1180
- .error {
1181
- border: 1px #f00;
1182
- background-color: #fdd;
1183
- }
1184
- .seriousError {
1185
- @extend .error;
1186
- border-width: 3px;
1187
- }
1188
- .criticalError {
1189
- @extend .seriousError;
1190
- position: fixed;
1191
- top: 10%;
1192
- bottom: 10%;
1193
- left: 10%;
1194
- right: 10%;
1195
- }
1196
-
1197
- Now everything with class `.seriousError` also has class `.error`,
1198
- and everything with class `.criticalError` has class `.seriousError`
1199
- *and* class `.error`.
1200
- It's compiled to:
1201
-
1202
- .error, .seriousError, .criticalError {
1203
- border: 1px #f00;
1204
- background-color: #fdd; }
1205
-
1206
- .seriousError, .criticalError {
1207
- border-width: 3px; }
1208
-
1209
- .criticalError {
1210
- position: fixed;
1211
- top: 10%;
1212
- bottom: 10%;
1213
- left: 10%;
1214
- right: 10%; }
1215
-
1216
- #### Selector Sequences
1217
-
1218
- Selector sequences, such as `.foo .bar` or `.foo + .bar`, currently can't be extended.
1219
- However, it is possible for nested selectors themselves to use `@extend`.
1220
- For example:
1221
-
1222
- #fake-links .link {@extend a}
1223
-
1224
- a {
1225
- color: blue;
1226
- &:hover {text-decoration: underline}
1227
- }
1228
-
1229
- is compiled to
1230
-
1231
- a, #fake-links .link {
1232
- color: blue; }
1233
- a:hover, #fake-links .link:hover {
1234
- text-decoration: underline; }
1235
-
1236
- ##### Merging Selector Sequences
1237
-
1238
- Sometimes a selector sequence extends another selector that appears in another sequence.
1239
- In this case, the two sequences need to be merged.
1240
- For example:
1241
-
1242
- #admin .tabbar a {font-weight: bold}
1243
- #demo .overview .fakelink {@extend a}
1244
-
1245
- While it would technically be possible
1246
- to generate all selectors that could possibly match either sequence,
1247
- this would make the stylesheet far too large.
1248
- The simple example above, for instance, would require ten selectors.
1249
- Instead, Sass generates only selectors that are likely to be useful.
1250
-
1251
- When the two sequences being merged have no selectors in common,
1252
- then two new selectors are generated:
1253
- one with the first sequence before the second,
1254
- and one with the second sequence before the first.
1255
- For example:
1256
-
1257
- #admin .tabbar a {font-weight: bold}
1258
- #demo .overview .fakelink {@extend a}
1259
-
1260
- is compiled to:
1261
-
1262
- #admin .tabbar a,
1263
- #admin .tabbar #demo .overview .fakelink,
1264
- #demo .overview #admin .tabbar .fakelink {
1265
- font-weight: bold; }
1266
-
1267
- If the two sequences do share some selectors,
1268
- then those selectors will be merged together
1269
- and only the differences (if any still exist) will alternate.
1270
- In this example, both sequences contain the id `#admin`,
1271
- so the resulting selectors will merge those two ids:
1272
-
1273
- #admin .tabbar a {font-weight: bold}
1274
- #admin .overview .fakelink {@extend a}
1275
-
1276
- This is compiled to:
1277
-
1278
- #admin .tabbar a,
1279
- #admin .tabbar .overview .fakelink,
1280
- #admin .overview .tabbar .fakelink {
1281
- font-weight: bold; }
1282
-
1283
- ### `@debug`
1284
-
1285
- The `@debug` directive prints the value of a SassScript expression
1286
- to the standard error output stream.
1287
- It's useful for debugging Sass files
1288
- that have complicated SassScript going on.
1289
- For example:
1290
-
1291
- @debug 10em + 12em;
1292
-
1293
- outputs:
1294
-
1295
- Line 1 DEBUG: 22em
1296
-
1297
- ### `@warn`
1298
-
1299
- The `@warn` directive prints the value of a SassScript expression
1300
- to the standard error output stream.
1301
- It's useful for libraries that need to warn users of deprecations
1302
- or recovering from minor mixin usage mistakes.
1303
- There are two major distinctions between `@warn` and `@debug`:
1304
-
1305
- 1. You can turn warnings off with the `--quiet` command-line option
1306
- or the `:quiet` Sass option.
1307
- 2. A stylesheet trace will be printed out along with the message
1308
- so that the user being warned can see where their styles caused the warning.
1309
-
1310
- Usage Example:
1311
-
1312
- @mixin adjust-location($x, $y) {
1313
- @if unitless($x) {
1314
- @warn "Assuming #{$x} to be in pixels";
1315
- $x: 1px * $x;
1316
- }
1317
- @if unitless($y) {
1318
- @warn "Assuming #{$y} to be in pixels";
1319
- $y: 1px * $y;
1320
- }
1321
- position: relative; left: $x; top: $y;
1322
- }
1323
-
1324
- ## Control Directives
1325
-
1326
- SassScript supports basic control directives
1327
- for including styles only under some conditions
1328
- or including the same style several times with variations.
1329
-
1330
- **Note that control directives are an advanced feature,
1331
- and are not recommended in the course of day-to-day styling**.
1332
- They exist mainly for use in [mixins](#mixins),
1333
- particularly those that are part of libraries like [Compass](http://compass-style.org),
1334
- and so require substantial flexibility.
1335
-
1336
- ### `@if`
1337
-
1338
- The `@if` directive takes a SassScript expression
1339
- and uses the styles nested beneath it if the expression returns
1340
- anything other than `false`:
1341
-
1342
- p {
1343
- @if 1 + 1 == 2 { border: 1px solid; }
1344
- @if 5 < 3 { border: 2px dotted; }
1345
- }
1346
-
1347
- is compiled to:
1348
-
1349
- p {
1350
- border: 1px solid; }
1351
-
1352
- The `@if` statement can be followed by several `@else if` statements
1353
- and one `@else` statement.
1354
- If the `@if` statement fails,
1355
- the `@else if` statements are tried in order
1356
- until one succeeds or the `@else` is reached.
1357
- For example:
1358
-
1359
- $type: monster;
1360
- p {
1361
- @if $type == ocean {
1362
- color: blue;
1363
- } @else if $type == matador {
1364
- color: red;
1365
- } @else if $type == monster {
1366
- color: green;
1367
- } @else {
1368
- color: black;
1369
- }
1370
- }
1371
-
1372
- is compiled to:
1373
-
1374
- p {
1375
- color: green; }
1376
-
1377
- ### `@for`
1378
-
1379
- The `@for` directive has two forms:
1380
- `@for $var from <start> to <end>` or
1381
- `@for $var from <start> through <end>`.
1382
- `$var` can be any variable name, like `$i`,
1383
- and `<start>` and `<end>` are SassScript expressions
1384
- that should return integers.
1385
-
1386
- The `@for` statement sets `$var` to each number
1387
- from `<start>` to `<end>`,
1388
- including `<end>` if `through` is used.
1389
- Then it outputs the nested styles
1390
- using that value of `$var`.
1391
- For example:
1392
-
1393
- @for $i from 1 through 3 {
1394
- .item-#{$i} { width: 2em * $i; }
1395
- }
1396
-
1397
- is compiled to:
1398
-
1399
- .item-1 {
1400
- width: 2em; }
1401
- .item-2 {
1402
- width: 4em; }
1403
- .item-3 {
1404
- width: 6em; }
1405
-
1406
- ### `@while`
1407
-
1408
- The `@while` directive takes a SassScript expression
1409
- and repeatedly outputs the nested styles
1410
- until the statement evaluates to `false`.
1411
- This can be used to achieve more complex looping
1412
- than the `@for` statement is capable of,
1413
- although this is rarely necessary.
1414
- For example:
1415
-
1416
- $i: 6;
1417
- @while $i > 0 {
1418
- .item-#{$i} { width: 2em * $i; }
1419
- $i: $i - 2;
1420
- }
1421
-
1422
- is compiled to:
1423
-
1424
- .item-6 {
1425
- width: 12em; }
1426
-
1427
- .item-4 {
1428
- width: 8em; }
1429
-
1430
- .item-2 {
1431
- width: 4em; }
1432
-
1433
- ## Mixin Directives {#mixins}
1434
-
1435
- Mixins allow you to define styles
1436
- that can be re-used throughout the stylesheet
1437
- without needing to resort to non-semantic classes like `.float-left`.
1438
- Mixins can also contain full CSS rules,
1439
- and anything else allowed elsewhere in a Sass document.
1440
- They can even take [arguments](#mixin-arguments)
1441
- which allows you to produce a wide variety of styles
1442
- with very few mixins.
1443
-
1444
- ### Defining a Mixin: `@mixin` {#defining_a_mixin}
1445
-
1446
- Mixins are defined with the `@mixin` directive.
1447
- It's followed by the name of the mixin
1448
- and optionally the [arguments](#mixin-arguments),
1449
- and a block containing the contents of the mixin.
1450
- For example, the `large-text` mixin is defined as follows:
1451
-
1452
- @mixin large-text {
1453
- font: {
1454
- family: Arial;
1455
- size: 20px;
1456
- weight: bold;
1457
- }
1458
- color: #ff0000;
1459
- }
1460
-
1461
- Mixins may also contain selectors,
1462
- possibly mixed with properties.
1463
- The selectors can even contain [parent references](#referencing_parent_selectors_).
1464
- For example:
1465
-
1466
- @mixin clearfix {
1467
- display: inline-block;
1468
- &:after {
1469
- content: ".";
1470
- display: block;
1471
- height: 0;
1472
- clear: both;
1473
- visibility: hidden;
1474
- }
1475
- * html & { height: 1px }
1476
- }
1477
-
1478
- ### Including a Mixin: `@include` {#including_a_mixin}
1479
-
1480
- Mixins are included in the document
1481
- with the `@include` directive.
1482
- This takes the name of a mixin
1483
- and optionally [arguments to pass to it](#mixin-arguments),
1484
- and includes the styles defined by that mixin
1485
- into the current rule.
1486
- For example:
1487
-
1488
- .page-title {
1489
- @include large-text;
1490
- padding: 4px;
1491
- margin-top: 10px;
1492
- }
1493
-
1494
- is compiled to:
1495
-
1496
- .page-title {
1497
- font-family: Arial;
1498
- font-size: 20px;
1499
- font-weight: bold;
1500
- color: #ff0000;
1501
- padding: 4px;
1502
- margin-top: 10px; }
1503
-
1504
- Mixins may also be included outside of any rule
1505
- (that is, at the root of the document)
1506
- as long as they don't directly define any properties
1507
- or use any parent references.
1508
- For example:
1509
-
1510
- @mixin silly-links {
1511
- a {
1512
- color: blue;
1513
- background-color: red;
1514
- }
1515
- }
1516
-
1517
- @include silly-links;
1518
-
1519
- is compiled to:
1520
-
1521
- a {
1522
- color: blue;
1523
- background-color: red; }
1524
-
1525
- Mixin definitions can also include other mixins.
1526
- For example:
1527
-
1528
- @mixin compound {
1529
- @include highlighted-background;
1530
- @include header-text;
1531
- }
1532
-
1533
- @mixin highlighted-background { background-color: #fc0; }
1534
- @mixin header-text { font-size: 20px; }
1535
-
1536
- Mixins that only define descendent selectors, can be safely mixed
1537
- into the top most level of a document.
1538
-
1539
- ### Arguments {#mixin-arguments}
1540
-
1541
- Mixins can take arguments SassScript values as arguments,
1542
- which are given when the mixin is included
1543
- and made available within the mixin as variables.
1544
-
1545
- When defining a mixin,
1546
- the arguments are written as variable names separated by commas,
1547
- all in parentheses after the name.
1548
- Then when including the mixin,
1549
- values can be passed in in the same manner.
1550
- For example:
1551
-
1552
- @mixin sexy-border($color, $width) {
1553
- border: {
1554
- color: $color;
1555
- width: $width;
1556
- style: dashed;
1557
- }
1558
- }
1559
-
1560
- p { @include sexy-border(blue, 1in); }
1561
-
1562
- is compiled to:
1563
-
1564
- p {
1565
- border-color: blue;
1566
- border-width: 1in;
1567
- border-style: dashed; }
1568
-
1569
- Mixins can also specify default values for their arguments
1570
- using the normal variable-setting syntax.
1571
- Then when the mixin is included,
1572
- if it doesn't pass in that argument,
1573
- the default value will be used instead.
1574
- For example:
1575
-
1576
- @mixin sexy-border($color, $width: 1in) {
1577
- border: {
1578
- color: $color;
1579
- width: $width;
1580
- style: dashed;
1581
- }
1582
- }
1583
- p { @include sexy-border(blue); }
1584
- h1 { @include sexy-border(blue, 2in); }
1585
-
1586
- is compiled to:
1587
-
1588
- p {
1589
- border-color: blue;
1590
- border-width: 1in;
1591
- border-style: dashed; }
1592
-
1593
- h1 {
1594
- border-color: blue;
1595
- border-width: 2in;
1596
- border-style: dashed; }
1597
-
1598
- ## Output Style
1599
-
1600
- Although the default CSS style that Sass outputs is very nice
1601
- and reflects the structure of the document,
1602
- tastes and needs vary and so Sass supports several other styles.
1603
-
1604
- Sass allows you to choose between four different output styles
1605
- by setting the [`:style` option](#style-option)
1606
- or using the `--style` command-line flag.
1607
-
1608
- ### `:nested`
1609
-
1610
- Nested style is the default Sass style,
1611
- because it reflects the structure of the CSS styles
1612
- and the HTML document they're styling.
1613
- Each property has its own line,
1614
- but the indentation isn't constant.
1615
- Each rule is indented based on how deeply it's nested.
1616
- For example:
1617
-
1618
- #main {
1619
- color: #fff;
1620
- background-color: #000; }
1621
- #main p {
1622
- width: 10em; }
1623
-
1624
- .huge {
1625
- font-size: 10em;
1626
- font-weight: bold;
1627
- text-decoration: underline; }
1628
-
1629
- Nested style is very useful when looking at large CSS files:
1630
- it allows you to easily grasp the structure of the file
1631
- without actually reading anything.
1632
-
1633
- ### `:expanded`
1634
-
1635
- Expanded is a more typical human-made CSS style,
1636
- with each property and rule taking up one line.
1637
- Properties are indented within the rules,
1638
- but the rules aren't indented in any special way.
1639
- For example:
1640
-
1641
- #main {
1642
- color: #fff;
1643
- background-color: #000;
1644
- }
1645
- #main p {
1646
- width: 10em;
1647
- }
1648
-
1649
- .huge {
1650
- font-size: 10em;
1651
- font-weight: bold;
1652
- text-decoration: underline;
1653
- }
1654
-
1655
- ### `:compact`
1656
-
1657
- Compact style takes up less space than Nested or Expanded.
1658
- It also draws the focus more to the selectors than to their properties.
1659
- Each CSS rule takes up only one line,
1660
- with every property defined on that line.
1661
- Nested rules are placed next to each other with no newline,
1662
- while separate groups of rules have newlines between them.
1663
- For example:
1664
-
1665
- #main { color: #fff; background-color: #000; }
1666
- #main p { width: 10em; }
1667
-
1668
- .huge { font-size: 10em; font-weight: bold; text-decoration: underline; }
1669
-
1670
- ### `:compressed`
1671
-
1672
- Compressed style takes up the minimum amount of space possible,
1673
- having no whitespace except that necessary to separate selectors
1674
- and a newline at the end of the file.
1675
- It also includes some other minor compressions,
1676
- such as choosing the smallest representation for colors.
1677
- It's not meant to be human-readable.
1678
- For example:
1679
-
1680
- #main{color:#fff;background-color:#000}#main p{width:10em}.huge{font-size:10em;font-weight:bold;text-decoration:underline}